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] Fix xencommons for NetBSD

To: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 15 Jul 2011 13:44:08 +0200
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 15 Jul 2011 04:44:57 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1310730252; l=479; s=domk; d=aepfle.de; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version: References:Subject:Cc:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=8Suy/Zeg+7CQDOqk0bc7doslgPQ=; b=GrFmpno8XXYrDXp78qJV24qf5WFsvnWMiES8/PwrgaeJCRAIL6+FtS81No9v1EVVO5D +r9d0ZEytrkK4q2eB694CxybBJ3aXWbN5Ljpb5lgb2vofUF4sa1C+WX5LUbHb50DfTizw kwkJbRiZRQs0F1p7mq3gbdYZjlld4wT4AYE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAPLaKK5Q4T39NFUT5g91L9p7Sj5oKg8zKPVs+QaqwBKqBPQ7dg@xxxxxxxxxxxxxx>
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: <CAPLaKK7siKth90wyjh465CVnmbDhFMZs3tLe_=fhuOjy2CmANQ@xxxxxxxxxxxxxx> <1310716893.634.552.camel@xxxxxxxxxxxxxxxxxxxxxx> <4E200171.5080700@xxxxxxx> <1310721214.634.561.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK5vbmF2GdDM1xz3R7-5+OMVTomaUv5zey0oYob=kVsDdg@xxxxxxxxxxxxxx> <1310722858.634.573.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK4dLuUfjsxPohcArTRV+eV6RU2ARqAHGkyy6bZL_c2BWQ@xxxxxxxxxxxxxx> <1310724488.634.577.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK5Q4T39NFUT5g91L9p7Sj5oKg8zKPVs+QaqwBKqBPQ7dg@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
On Fri, Jul 15, Roger Pau Monné wrote:

> Another one, used -n instead of -z when testing the presence of
> XENSTORED_ROOTDIR. Sorry for this mess, I'm not really used to make
> shell init scripts.

+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       if test -z $xenstored_pid; then

Doesnt this expand to 'if test -z ; then' if check_pidfile returns
nothing, causing a shell syntax error?
Better do 'if test -z "$variable" ; then'.

Olaf

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