From: Stephen Hemminger Date: Tue, 9 May 2006 17:56:53 +0000 (-0700) Subject: if you simply run `ifcfg iface`, you get: X-Git-Tag: v2.6.19-061214~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58bb642f72314c44c14ba958d78eab64244968ed;p=thirdparty%2Fiproute2.git if you simply run `ifcfg iface`, you get: /sbin/ifcfg: line 25: [: too many arguments /sbin/ifcfg: line 26: [: -ge: unary operator expected /sbin/ifcfg: line 27: [: -ge: unary operator expected /sbin/ifcfg: line 28: [: -ge: unary operator expected might i suggest the attached patch -mike --- diff --git a/ip/ifcfg b/ip/ifcfg index ed6960f7a..fb0fe51be 100644 --- a/ip/ifcfg +++ b/ip/ifcfg @@ -86,6 +86,10 @@ if [ "$peer" != "" ]; then fi pfx="$ipaddr peer $peer" else + if [ "$ipaddr" = "" ]; then + echo "Missing IP address argument." 1>&2 + exit 1 + fi if [ "$pfxlen" = "" ]; then ABCMaskLen $ipaddr pfxlen=$?