[xen-tools] Re: [PATCH] workaround dash arithmetic expansion issues in 90-make-fstab
Steve Kemp
steve at steve.org.uk
Sun Jul 22 23:11:48 CEST 2007
On Sun Jul 22, 2007 at 16:59:04 -0400, Andrew Sutherland wrote:
> Although bash is cool with $(( x+1 )), dash is not.
Grr. Thanks for the report, and even more for the patch.
> Both are cool with $(( $x+1 )), which is what this patch does.
I'd almost be tempted to convert to using less shell built-ins
and take the overhead of:
x=$(expr $x + 1)
That is very explicit and should avoid potential issues with
other shells. Still for the moment I'll apply your patch - if there
are any future occurrences of this type of problem I will make the
switch en masse.
> this presumably only affects distributions using dash as their /bin/sh,
> it seems wise to change it in all hooks.
Agreed. Applied now.
Steve
--
Debian GNU/Linux System Administration
http://www.debian-administration.org/
More information about the xen-tools-discuss
mailing list