debuggers.hg

changeset 22851:b5579db3dabf

tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd

"xen-watchdog stop" attempts to kill non existing "watchdogd" but
misses the running "xenwatchdogd". This also provokes errors during
install and Debian package management.

Signed-off-by: user virtual <virtualusr@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author user virtual <virtualusr@gmail.com>
date Tue Jan 25 16:42:00 2011 +0000 (2011-01-25)
parents 5e91e7a6b130
children eefb8e971be5
files tools/hotplug/Linux/init.d/xen-watchdog
line diff
     1.1 --- a/tools/hotplug/Linux/init.d/xen-watchdog	Tue Jan 25 14:07:39 2011 +0000
     1.2 +++ b/tools/hotplug/Linux/init.d/xen-watchdog	Tue Jan 25 16:42:00 2011 +0000
     1.3 @@ -17,6 +17,9 @@
     1.4  ### END INIT INFO
     1.5  #
     1.6  
     1.7 +DAEMON=/usr/sbin/xenwatchdogd
     1.8 +base=$(basename $DAEMON)
     1.9 +
    1.10  # Source function library.
    1.11  if [ -e  /etc/init.d/functions ] ; then
    1.12      . /etc/init.d/functions
    1.13 @@ -39,10 +42,9 @@ fi
    1.14  
    1.15  start() {
    1.16  	local r
    1.17 -	base="watchdogd"
    1.18  	echo -n $"Starting domain watchdog daemon: "
    1.19  
    1.20 -	/usr/sbin/xenwatchdogd 30 15
    1.21 +	$DAEMON 30 15
    1.22  	r=$?
    1.23  	[ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
    1.24  	echo
    1.25 @@ -52,10 +54,9 @@ start() {
    1.26  
    1.27  stop() {
    1.28  	local r
    1.29 -	base="watchdogd"
    1.30  	echo -n $"Stopping domain watchdog daemon: "
    1.31  
    1.32 -	killall -USR1 watchdogd 2>/dev/null
    1.33 +	killall -USR1 $base 2>/dev/null
    1.34  	r=$?
    1.35  	[ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
    1.36  	echo