3 # $Id: ifup-routes,v 1.14 2002/08/11 17:05:09 misiek Exp $
5 # adds static routes which go through device $DEVICE
7 . /etc/sysconfig/network
8 . /etc/rc.d/init.d/functions
9 . /etc/sysconfig/network-scripts/functions.network
13 if [ -z "$DEV" ]; then
14 nls "Usage: %s <device name>" "ifup-routes" >&2
18 if [ ! -f /etc/sysconfig/static-routes ]; then
22 if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
23 CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
30 # set all major variables
33 get_ppp_device_and_pid
35 # note the trailing white space character in the grep gets rid of aliases
36 egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do
37 if (echo $args | grep -q ":") then
38 if is_no "$IPV6_NETWORKING"; then
42 if is_no "$IPV4_NETWORKING"; then
46 /sbin/ip route add $args dev $REALDEVICE
50 # This must be last line !
51 # vi:syntax=sh:tw=78:ts=8:sw=4