[Debian-ha-maintainers] OpenAIS, Corosync, Pacemaker

Guido Günther agx at sigxcpu.org
Fri Aug 21 16:41:01 UTC 2009


> From b221ad1c6e03c9993d937db5b1a819c6169ab8fe Mon Sep 17 00:00:00 2001
> From: Ante Karamatic <ivoks at ubuntu.com>
> Date: Fri, 21 Aug 2009 13:58:14 +0200
> Subject: [PATCH] Fix init script so that it stops corosync
> 
> ---
>  debian/corosync.init |   20 +++++++++-----------
>  1 files changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/debian/corosync.init b/debian/corosync.init
> index 501b29d..a31b6ad 100644
> --- a/debian/corosync.init
> +++ b/debian/corosync.init
> @@ -32,9 +32,6 @@ if [ "$START" != "yes" ]; then
>  	exit 0
>  fi
>  
> -# Load the VERBOSE setting and other rcS variables
> -[ -f /etc/default/rcS ] && . /etc/default/rcS
> -
>  # Define LSB log_* functions.
>  # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
>  . /lib/lsb/init-functions
> @@ -55,6 +52,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
Is this really safer than using --name $NAME with start-stop-daemon?

>  #
> @@ -67,7 +65,7 @@ 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/QUIT/5/QUIT --pidfile $PIDFILE
Shouldn't this simply be:
	start-stop-daemon --stop --quiet --signal QUIT --retry=5 --name $NAME
The rest looks good from my POV. Martin?
Cheers,
 -- Guido



More information about the Debian-ha-maintainers mailing list