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
This commit is contained in:
Stephen Hemminger 2006-05-09 10:56:53 -07:00
parent adeb6bf25e
commit 58bb642f72

View File

@ -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=$?