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: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD
From: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 15 Jul 2011 14:06:08 +0200
Cc: Olaf Hering <olaf@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>
Delivery-date: Fri, 15 Jul 2011 05:08:26 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=4cOifAVrCdfnF3X4RKhPM2DibNeBvlzc2vjLd8V11/k=; b=BLwOJb5FJH1bwEtMtCXlmZ5Zl9NfABwn6xKwi3AiEqG+4TfF7AtCsxooN1GVOzyKcY VMOiwJeaHtcC360zL6ZSUExmhsJUBPGiTV+XgwEBKz/fXoQFulZokblOrTNxP9lGndL5 2A+zgqYDDwMpI23XjlJpNqTGJldTvUg71T5aM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310731016.20648.6.camel@xxxxxxxxxxxxxxxxxxxxxx>
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> <20110715114407.GA17857@xxxxxxxxx> <1310731016.20648.6.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
It works fine on NetBSD too, but just to be on the safe side I've
changed it. Thanks.

2011/7/15 Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>:
> On Fri, 2011-07-15 at 12:44 +0100, Olaf Hering wrote:
>> 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?
>
> Seems not:
> $ dash -c 'if test -z ; then echo foo ; fi'
> foo
> $ posh -c 'if test -z ; then echo foo ; fi'
> foo
>
> (maybe NetBSD sh(1) or test(1) differs though)
>
>> Better do 'if test -z "$variable" ; then'.
>
> That's still good advice IMHO.
>
> Ian.
>
>
>

Attachment: patch-xencommons
Description: Binary data

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