|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] xencommons: kill xenstored when stop xencommons
xenstored should be killed when stop xencommons.
Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
diff -r 72c6228b5f0f -r be32d4fe1e8a tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons Mon Jun 21 19:19:25 2010 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons Tue Jun 22 17:39:37 2010 +0800
@@ -21,6 +21,7 @@
test -f /etc/sysconfig/xencommons && . /etc/sysconfig/xencommons
+XENSTORED_PIDFILE=/var/run/xenstore.pid
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
shopt -s extglob
@@ -43,7 +44,7 @@
test -z "$XENSTORED_ROOTDIR" ||
XENSTORED_ROOTDIR="/var/lib/xenstored"
rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T
/var/log/xen/xenstored-trace.log"
- xenstored --pid-file=/var/run/xenstore.pid $XENSTORED_ARGS
+ xenstored --pid-file=$XENSTORED_PIDFILE $XENSTORED_ARGS
xenstore-write "/local/domain/0/name" "Domain-0"
fi
@@ -53,6 +54,12 @@
test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
}
do_stop () {
+ if read 2>/dev/null <$XENSTORED_PIDFILE pid; then
+ kill $pid
+ while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ rm -f $XENSTORED_PIDFILE
+ fi
+
if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
kill $pid
while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] xencommons: kill xenstored when stop xencommons,
Yu Zhiguo <=
|
|
|
|
|