Blame SOURCES/galera-init-start.patch

9852d1
Service start reported failure even in case of proper start. It was probably
9852d1
caused by race condition when the forked process was not ready yet.
9852d1
Giving an extra second should do the same trick as in case of debian start
9852d1
script (see different branch in the same function).
9852d1
9852d1
RHBZ: #1466473
9852d1
9852d1
diff -up galera-3-25.3.12/garb/files/garb.sh.pstart galera-3-25.3.12/garb/files/garb.sh
9852d1
--- galera-3-25.3.12/garb/files/garb.sh.pstart	2017-07-18 12:41:43.411222266 +0200
9852d1
+++ galera-3-25.3.12/garb/files/garb.sh	2017-07-18 12:41:19.559168772 +0200
9852d1
@@ -55,6 +55,8 @@ program_start() {
9852d1
 		echo -n $"Starting $prog: "
9852d1
 		daemon --user nobody $prog "$@" >/dev/null
9852d1
 		rcode=$?
9852d1
+		# Hack: sleep a bit to give garbd some time to fork
9852d1
+		sleep 2
9852d1
 		if [ $rcode -eq 0 ]; then
9852d1
 			pidof $prog > $PIDFILE || rcode=$?
9852d1
 		fi