[libvirt] [PATCH] nwfilter: use /bin/sh rather than requiring bash

Eric Blake eblake at redhat.com
Sun Nov 14 00:16:50 UTC 2010


On 11/13/2010 05:04 PM, Stefan Berger wrote:
>> @@ -427,7 +430,7 @@ static int iptablesLinkIPTablesBaseChain(const
>> char *iptables_cmd,
>>                         "    " CMD_DEF("%s -I %s %d -j %s") CMD_SEPARATOR
>>                         "    " CMD_EXEC
>>                         "    %s"
>> -                      "    let r=r+1\n"
>> +                      "    r=$(( $r + 1 ))\n"
> 
> /bin/sh on my system points to bash. What else is it allowed to point
> to?

Debian-based systems set it to dash, which doesn't understand let; and
we do have examples of people in this configuration.  Also, someone
going for a minimal-weight hypervisor might want to use busybox sh,
another POSIX shell that lacks let; but I'm not sure of anyone using
both busybox and kvm-qemu at the same time.

> 
> Since you are the expert with shells and I trust that the TCK tests now
> pass with all possible /bin/sh's, you get my ACK.

Hmm - I guess I'd better test with dash and the TCK before actually
pushing this.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101113/bf1e461c/attachment-0001.sig>


More information about the libvir-list mailing list