diff options
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 209fd41a..3c64e072 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -99,8 +99,10 @@ else ifconfig ${DEVICE} ${MACADDR:+hw ether $MACADDR} ${IPADDR} \ netmask ${NETMASK} broadcast ${BROADCAST} + # don't re-add subnet route on 2.2 kernels, but add a route + # to a non-local subnet. # stupid hack, but it should work - if [ "$ISALIAS" = no ] && [ ! -f "/proc/sys/kernel/modprobe" ] ; then + if [ "$ISALIAS" = no -a ! -f "/proc/sys/kernel/modprobe" ] || [ -z "`route -n | sed "s/ .*//" | grep ${NETWORK}`" ]; then route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE} else route add -host ${IPADDR} ${DEVICE} |