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 ed6960f..fb0fe51 100644
--- a/ip/ifcfg
+++ b/ip/ifcfg
@@ -86,6 +86,10 @@
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=$?