WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xend: prompt user start xencommons

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xend: prompt user start xencommons
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Wed, 23 Jun 2010 09:09:36 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Jun 2010 18:10:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19488.53356.218410.612469@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C2019AF.70608@xxxxxxxxxxxxxx> <19488.53356.218410.612469@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
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@xxxxxxxxxxxxxx>

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>