[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 3] xencommons: Kill xenstored when stopping xencommons
xenstored cannot be restarted once stopped so I think we want to be careful about ever stopping it in a command which a user might "normally" call. On Mon, 2010-06-28 at 13:58 +0100, George Dunlap wrote: > Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> > > diff -r bf64e1081333 -r e71645625934 tools/hotplug/Linux/init.d/xencommons > --- a/tools/hotplug/Linux/init.d/xencommons Fri Jun 25 16:05:20 2010 +0100 > +++ b/tools/hotplug/Linux/init.d/xencommons Mon Jun 28 13:24:26 2010 +0100 > @@ -22,6 +22,7 @@ > test -f /etc/sysconfig/xencommons && . /etc/sysconfig/xencommons > > XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid > +XENSTORED_PIDFILE=/var/run/xenstored.pid > shopt -s extglob > > if test "x$1" = xstart && \ > @@ -42,7 +43,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 > > @@ -57,6 +58,12 @@ > while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done > rm -f $XENCONSOLED_PIDFILE > fi > + > + 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 > } > > case "$1" in > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |