Blame SOURCES/mariadb-galera-new-cluster-init.patch

9c9e62
diff -Naurp mariadb-10.2.18/scripts/galera_new_cluster.sh mariadb-10.2.18/scripts/galera_new_cluster.sh_patched
9c9e62
--- mariadb-10.2.18/scripts/galera_new_cluster.sh	2018-10-04 16:03:52.428556126 +0200
9c9e62
+++ mariadb-10.2.18/scripts/galera_new_cluster.sh_patched	2018-10-04 16:05:34.139765818 +0200
9c9e62
@@ -21,7 +21,12 @@ EOF
9c9e62
     exit 0
9c9e62
 fi
f55c7d
 
f55c7d
-systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
f55c7d
-    systemctl start ${1:-@DAEMON_NAME@}
f55c7d
+echo "_WSREP_NEW_CLUSTER='--wsrep-new-cluster'" >> @sysconfdir@/sysconfig/mariadb
9c9e62
 
9c9e62
-systemctl set-environment _WSREP_NEW_CLUSTER=''
f55c7d
+service @DAEMON_NAME@ start
f55c7d
+
f55c7d
+EXIT_CODE=$?
f55c7d
+
f55c7d
+sed -i -r "/^_WSREP_NEW_CLUSTER='--wsrep-new-cluster'$/d" @sysconfdir@/sysconfig/mariadb
f55c7d
+
f55c7d
+exit $EXIT_CODE