* [PATCH] xend: prompt user start xencommons
@ 2010-06-22 2:02 Yu Zhiguo
2010-06-22 15:02 ` Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Yu Zhiguo @ 2010-06-22 2:02 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
prompt user start xencommons first if it is not running.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
diff -r be32d4fe1e8a -r 139ec4ec4067 tools/hotplug/Linux/init.d/xend
--- a/tools/hotplug/Linux/init.d/xend Tue Jun 22 17:39:37 2010 +0800
+++ b/tools/hotplug/Linux/init.d/xend Tue Jun 22 18:04:59 2010 +0800
@@ -37,6 +37,11 @@
case "$1" in
start)
+ service xencommons status >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "xencommons should be started first."
+ exit 1
+ fi
mkdir -p /var/lock/subsys
touch /var/lock/subsys/xend
xend start
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xend: prompt user start xencommons
2010-06-22 2:02 [PATCH] xend: prompt user start xencommons Yu Zhiguo
@ 2010-06-22 15:02 ` Ian Jackson
2010-06-23 1:09 ` Yu Zhiguo
0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2010-06-22 15:02 UTC (permalink / raw)
To: Yu Zhiguo; +Cc: xen-devel@lists.xensource.com
Yu Zhiguo writes ("[Xen-devel] [PATCH] xend: prompt user start xencommons"):
> prompt user start xencommons first if it is not running.
This isn't portable. The "service" command is not available on all
distributions.
Perhaps a better check would be to see if xenstored is running, by
calling xenstore-read -s / or some such ?
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xend: prompt user start xencommons
2010-06-22 15:02 ` Ian Jackson
@ 2010-06-23 1:09 ` Yu Zhiguo
0 siblings, 0 replies; 3+ messages in thread
From: Yu Zhiguo @ 2010-06-23 1:09 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com
Hi Ian
Ian Jackson wrote:
> Yu Zhiguo writes ("[Xen-devel] [PATCH] xend: prompt user start xencommons"):
>> prompt user start xencommons first if it is not running.
>
> This isn't portable. The "service" command is not available on all
> distributions.
>
Indeed.
> Perhaps a better check would be to see if xenstored is running, by
> calling xenstore-read -s / or some such ?
>
I'd like to check xenconsoled rather than xenstored is running or not
to determine xencommons status, because xenconsoled can be killed
when stop xencommons.
----------------------
prompt user start xencommons first if it is not running.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
diff -r a24dbfcbdf69 -r ee71d51a0437 tools/hotplug/Linux/init.d/xend
--- a/tools/hotplug/Linux/init.d/xend Tue Jun 22 07:19:38 2010 +0100
+++ b/tools/hotplug/Linux/init.d/xend Wed Jun 23 17:11:34 2010 +0800
@@ -37,6 +37,10 @@
case "$1" in
start)
+ if [ -z "`ps -C xenconsoled -o pid=`" ]; then
+ echo "xencommons should be started first."
+ exit 1
+ fi
mkdir -p /var/lock/subsys
touch /var/lock/subsys/xend
xend start
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-23 1:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-22 2:02 [PATCH] xend: prompt user start xencommons Yu Zhiguo
2010-06-22 15:02 ` Ian Jackson
2010-06-23 1:09 ` Yu Zhiguo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).