diff options
-rw-r--r-- | initscripts.spec | 1 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 17 |
2 files changed, 7 insertions, 11 deletions
diff --git a/initscripts.spec b/initscripts.spec index dc3b1537..0f5c5b38 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -251,6 +251,7 @@ rm -rf $RPM_BUILD_ROOT - faster check in network-functions:check_default_route() - better checks for backup files - drastically reduce the number of consoletype invocations +- do not export "GATEWAY" in network-functions * Fri Jul 05 2002 Florian La Roche <Florian.LaRoche@redhat.de> - rc.sysinit: do not load raid modules unless /etc/raidtab exists diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index c54be9a3..f0c4a08d 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -160,13 +160,11 @@ find_gateway_dev () { . /etc/sysconfig/network if [ -n "${GATEWAY}" -a "${GATEWAY}" != "none" ] ; then - # XXX why? - export GATEWAY dev=`LC_ALL=C /sbin/ip route | \ grep ${GATEWAY} | \ sed -e 's/.* dev \([:alnum:]*\)/\1/'` if [ -n "$dev" ]; then - GATEWAYDEV=$dev + GATEWAYDEV="$dev" fi fi } @@ -176,9 +174,8 @@ add_default_route () . /etc/sysconfig/network check_default_route && return 0 find_gateway_dev - if [ "$GATEWAYDEV" != "" -a \ - "${GATEWAY}" != "" -a \ - "${GATEWAY}" != "none" ] ; then + if [ "$GATEWAYDEV" != "" -a -n "${GATEWAY}" -a \ + "${GATEWAY}" != "none" ]; then if ! check_device_down $1; then if [ "$GATEWAY" = "0.0.0.0" ]; then /sbin/ip route add default dev ${GATEWAYDEV} @@ -186,11 +183,9 @@ add_default_route () /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 + elif [ -f /etc/default-route ]; then + /sbin/ip route add default via `cat /etc/default-route` + rm -f /etc/default-route fi } |