net=$1
+saveifs="$IFS"
IFS=';'
-# TODO allow for /etc/sysconfig/$net also
-test -f /etc/sysconfig/$net.net || echo "unknown network configuration '$net'" >&2 && exit 1
+test -f /etc/networks/$net || (echo "unknown network configuration '$net'" >&2 && exit 1)
ifup_post() {
return 0
return 0
}
-. /etc/sysconfig/$net.net
+. /etc/networks/$net
-if [ $enable = 'no' || $enable -eq 0 ]; then; exit 0; fi
+if [ "$enable" = 'no' ]; then exit 0; fi
+#if [ "$enable" -eq 0 ]; then exit 0; fi
ifup_pre
ip link set dev $dev up
for address in $addr do
+ IFS="$saveifs"
ip addr add $address dev $dev
+ IFS=';'
done
for r in $route; do
+ IFS="$saveifs"
ip route add $r
+ IFS=';'
done
ifup_post