[Debian-ha-svn-commits] [SCM] corosync Debian packaging branch, master, updated. debian/1.0.0-5
Guido Günther
agx at sigxcpu.org
Sat Aug 29 11:15:38 UTC 2009
The following commit has been merged in the master branch:
commit 0fb550ece9ad2c8dbfb859fad5b299ccecf2ba23
Author: Guido Günther <agx at sigxcpu.org>
Date: Fri Aug 28 06:18:25 2009 +0200
use QUIT to terminate processes
uset pidfile to avoid sending SIGQUIT to the init script itself
diff --git a/debian/corosync.init b/debian/corosync.init
index 501b29d..c47a0df 100644
--- a/debian/corosync.init
+++ b/debian/corosync.init
@@ -21,6 +21,7 @@ DAEMON=/usr/sbin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
+PIDFILE=/var/run/corosync.pid
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@@ -55,6 +56,7 @@ do_start()
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
+ pidof corosync > $PIDFILE
}
#
@@ -67,17 +69,9 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
+ start-stop-daemon --stop --quiet --signal=QUIT --retry=5 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
- # Wait for children to finish too if this is a daemon that forks
- # and if the daemon is only ever run from this initscript.
- # If the above conditions are not satisfied then add some other code
- # that waits for the process to drop all resources that could be
- # needed by services started subsequently. A last resort is to
- # sleep for some time.
- start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
- [ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
--
corosync Debian packaging
More information about the Debian-ha-svn-commits
mailing list