|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD
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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, (continued)
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Ian Campbell
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Christoph Egger
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Ian Campbell
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Roger Pau Monné
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Ian Campbell
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Roger Pau Monné
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Ian Campbell
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Roger Pau Monné
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Christoph Egger
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Olaf Hering
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD,
Ian Campbell <=
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Roger Pau Monné
- Re: [Xen-devel] [PATCH] Fix xencommons for NetBSD, Ian Jackson
|
|
|
|
|