[libvirt] [PATCH] nwfilter: use /bin/sh rather than requiring bash
Eric Blake
eblake at redhat.com
Tue Nov 16 00:18:56 UTC 2010
On 11/13/2010 05:04 PM, Stefan Berger wrote:
> On 11/13/2010 04:52 PM, Eric Blake wrote:
>> * src/nwfilter/nwfilter_ebiptables_driver.c
>> (ebiptablesWriteToTempFile): Use /bin/sh.
>> (bash_cmd_path): Delete.
>> (ebiptablesDriverInit, ebiptablesDriverShutdown): No need to
>> search for bash.
>> (CMD_EXEC): Prefer $() over ``, since we can assume POSIX.
>> (iptablesSetupVirtInPost): Use portable 'test' syntax.
>> (iptablesLinkIPTablesBaseChain): Use POSIX $(()) syntax.
>
> 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.
Well, at least with all POSIX-compliant /bin/sh, which is what Linux is
likely to have, and nwfilter requires Linux.
It won't work with Solaris /bin/sh, but that's a much harder portability
target since it is so old (bourne shell, which pre-dates POSIX). But
thankfully not an issue for this patch.
I've gone ahead and pushed it.
--
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/20101115/2c3b0a28/attachment-0001.sig>
More information about the libvir-list
mailing list