From 8a998885175388ada90c32ed06000e22648d5b18 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 9 Aug 2001 03:42:16 +0000 Subject: switch some more things to /sbin/ip; allow adding back of default route for DHCP devices (#48994) --- sysconfig/network-scripts/network-functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/network-functions') 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 } -- cgit v1.2.1