From b5bf14a6ab0d24073d0dd4debf87c7fc15a1e43f Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 7 May 2013 11:10:26 +0200 Subject: extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys Without a lockfile under /var/lock/subsys, the glusterd service is not stopped on shutdown or reboot. Change-Id: I9dc9b4204c5c39879c22191b2e8a2b81a4f3a58a BUG: 960476 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/4960 Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System Reviewed-by: Anand Avati --- extras/init.d/glusterd-Redhat.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'extras') diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index e1e5e859c..7db7e1be7 100755 --- a/extras/init.d/glusterd-Redhat.in +++ b/extras/init.d/glusterd-Redhat.in @@ -47,6 +47,8 @@ GLUSTERD_OPTS="--pid-file=$PIDFILE ${GLUSTERD_OPTIONS}" GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS" RETVAL=0 +LOCKFILE=/var/lock/subsys/${BASE} + # Start the service $BASE start() { @@ -59,6 +61,7 @@ start() daemon $GLUSTERD RETVAL=$? echo + [ $RETVAL -eq 0 ] && touch $LOCKFILE return $RETVAL fi } @@ -73,6 +76,9 @@ stop() else killproc $BASE fi + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f $LOCKFILE + return $RETVAL } restart() -- cgit