summaryrefslogtreecommitdiffstats
path: root/extras/init.d
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2013-05-07 11:10:26 +0200
committerAnand Avati <avati@redhat.com>2013-05-07 11:44:29 -0700
commitb5bf14a6ab0d24073d0dd4debf87c7fc15a1e43f (patch)
tree53a2c149d0b634bd4cc898cc6eedfb84c559edda /extras/init.d
parent273a42a421a7deeb3cde9865cfe4bab4826fdb7f (diff)
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 <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4960 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'extras/init.d')
-rwxr-xr-xextras/init.d/glusterd-Redhat.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in
index e1e5e859c7c..7db7e1be701 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()