[ovs-dev] [PATCH v3] rhel: Enable DHCP in redhat network scripts.

Alexey I. Froloff raorn at altlinux.org
Tue Jan 31 22:31:39 UTC 2012


On Tue, Jan 31, 2012 at 01:26:50PM -0800, Ben Pfaff wrote:
> On Tue, Jan 31, 2012 at 01:21:40PM -0800, Gurucharan Shetty wrote:
> My apologies.  But, regardless, I just noticed that
>     if [ "${OVSBOOTPROTO}" = "dhcp" -a -n "${OVSINTF}" ]; then
> should really be written as
>     if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
> for safety.  As POSIX says:
First variant is safe because of "-n":

$ sh -c '[ "foo" = foo -a "!" ]; echo $?'         
sh: line 0: [: argument expected
2
$ sh -c '[ "foo" = foo -a -n "!" ]; echo $?'
0

-- 
Regards,    --
Sir Raorn.   --- http://thousandsofhate.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20120201/679ab240/attachment-0003.sig>


More information about the dev mailing list