diff options
author | Bill Nottingham <notting@redhat.com> | 2001-08-09 03:42:16 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-08-09 03:42:16 +0000 |
commit | 8a998885175388ada90c32ed06000e22648d5b18 (patch) | |
tree | 94aee0ed42abc1789606d2f3d47a20642d2bde86 /sysconfig/network-scripts/network-functions | |
parent | ae0f713b19cce1f749b2d3e4011c6561e4854654 (diff) | |
download | initscripts-8a998885175388ada90c32ed06000e22648d5b18.tar initscripts-8a998885175388ada90c32ed06000e22648d5b18.tar.gz initscripts-8a998885175388ada90c32ed06000e22648d5b18.tar.bz2 initscripts-8a998885175388ada90c32ed06000e22648d5b18.tar.xz initscripts-8a998885175388ada90c32ed06000e22648d5b18.zip |
switch some more things to /sbin/ip; allow adding back of default route for DHCP devices (#48994)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index ee6b3356..2f181d73 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -166,11 +166,16 @@ add_default_route () if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" -a "${GATEWAYDEV}" != "" ] ; then if ! check_device_down $1; then if [ "$GATEWAY" = "0.0.0.0" ]; then - /sbin/route add default ${GATEWAYDEV} + /sbin/ip route add default ${GATEWAYDEV} else - /sbin/route add default gw ${GATEWAY} ${GATEWAYDEV} + /sbin/ip route add default via ${GATEWAY} fi fi + else + if [ -f /etc/default-route ]; then + /sbin/ip route add default via `cat /etc/default-route` + rm -f /etc/default-route + fi fi } |