From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: Re: [PATCH] xend: prompt user start xencommons Date: Wed, 23 Jun 2010 09:09:36 +0800 Message-ID: <4C215ED0.80708@cn.fujitsu.com> References: <4C2019AF.70608@cn.fujitsu.com> <19488.53356.218410.612469@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19488.53356.218410.612469@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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 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