aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug
diff options
context:
space:
mode:
authoruser virtual <virtualusr@gmail.com>2011-01-25 16:42:00 +0000
committeruser virtual <virtualusr@gmail.com>2011-01-25 16:42:00 +0000
commit45244f3cd1716008b27a31957472d2abf71c55a1 (patch)
tree0a93b4df0590a727eb6c93e2d4e831bf4d599bf6 /tools/hotplug
parent936e64a4c89952e6103398e67b213c7bca089c4b (diff)
downloadxen-45244f3cd1716008b27a31957472d2abf71c55a1.tar.gz
xen-45244f3cd1716008b27a31957472d2abf71c55a1.tar.bz2
xen-45244f3cd1716008b27a31957472d2abf71c55a1.zip
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>
Diffstat (limited to 'tools/hotplug')
-rw-r--r--tools/hotplug/Linux/init.d/xen-watchdog9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/hotplug/Linux/init.d/xen-watchdog b/tools/hotplug/Linux/init.d/xen-watchdog
index 620e8415d0..a5b3f6b961 100644
--- a/tools/hotplug/Linux/init.d/xen-watchdog
+++ b/tools/hotplug/Linux/init.d/xen-watchdog
@@ -17,6 +17,9 @@
### END INIT INFO
#
+DAEMON=/usr/sbin/xenwatchdogd
+base=$(basename $DAEMON)
+
# Source function library.
if [ -e /etc/init.d/functions ] ; then
. /etc/init.d/functions
@@ -39,10 +42,9 @@ fi
start() {
local r
- base="watchdogd"
echo -n $"Starting domain watchdog daemon: "
- /usr/sbin/xenwatchdogd 30 15
+ $DAEMON 30 15
r=$?
[ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
echo
@@ -52,10 +54,9 @@ start() {
stop() {
local r
- base="watchdogd"
echo -n $"Stopping domain watchdog daemon: "
- killall -USR1 watchdogd 2>/dev/null
+ killall -USR1 $base 2>/dev/null
r=$?
[ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
echo