From f00720f3ed760f018d8c847476563a5eb1b111a3 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: Ib2c28821061ed0fd374731681a81f3fd8e989193 BUG: 960476 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/4961 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(+) 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