From: <smi...@us...> - 2004-03-13 01:19:56
|
Update of /cvsroot/devil-linux/build/config/etc/init.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2615/config/etc/init.d Modified Files: network Log Message: added support for cidr netmasks to ifcfg- files (Heiko / Cameron Miller) Index: network =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/init.d/network,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- network 11 Feb 2004 16:57:08 -0000 1.28 +++ network 13 Mar 2004 01:11:12 -0000 1.29 @@ -245,8 +245,13 @@ fi # add the route - echo " adding route to $CMD ${target}${netmask:+/$netmask}${gateway:+ via gateway $gateway} on $DEVICE" - route add -$CMD ${target} ${netmask:+netmask $netmask} ${gateway:+gw $gateway} dev $DEVICE + if [ -n "${netmask##*.*}" ]; then + echo " adding route to $CMD ${target}${netmask:+/$netmask}${gateway:+ via gateway $gateway} on $DEVICE" + route add -$CMD ${target} ${netmask:+netmask $netmask} ${gateway:+gw $gateway} dev $DEVICE + else +v echo " adding route to -$CMD $destination ${gateway:+ via gateway $gateway} on $DEVICE" + route add -$CMD ${destination} ${gateway:+gw $gateway} dev $DEVICE + fi done fi fi |