All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhiguo <yuzg@cn.fujitsu.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] xend: prompt user start xencommons
Date: Wed, 23 Jun 2010 09:09:36 +0800	[thread overview]
Message-ID: <4C215ED0.80708@cn.fujitsu.com> (raw)
In-Reply-To: <19488.53356.218410.612469@mariner.uk.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

      reply	other threads:[~2010-06-23  1:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C215ED0.80708@cn.fujitsu.com \
    --to=yuzg@cn.fujitsu.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.