From 906238c891d3f02b4c706457783694e3a01d91ce Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Wed, 10 May 2006 00:08:02 +0000 Subject: Add METRIC= support for default routes (#124045) * ifup-ppp, network-functions: Save all default routes, lose no data. * network-functions: - (find_gateway_dev): Fix - it should find the device while $GATEWAY is not the default route - (add_default_route): Don't use configuration for the device that is being brought down; document function purpose and bugs. --- sysconfig/network-scripts/ifdown-post | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifdown-post') diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post index ed944950..87f28a16 100755 --- a/sysconfig/network-scripts/ifdown-post +++ b/sysconfig/network-scripts/ifdown-post @@ -25,9 +25,11 @@ if ! check_default_route ; then # ISDN device needs special handling dial on demand if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && [ "$DIALMODE" = "auto" ] ; then if [ -z "$GATEWAY" ] ; then - /sbin/ip route add default ${WINDOW:+window $WINDOW} dev ${DEVICE} + /sbin/ip route add default ${METRIC:+metric} \ + ${WINDOW:+window $WINDOW} dev ${DEVICE} else - /sbin/ip route add default ${WINDOW:+window $WINDOW} via ${GATEWAY} + /sbin/ip route add default ${METRIC:+metric} \ + ${WINDOW:+window $WINDOW} via ${GATEWAY} fi else add_default_route ${DEVICE} -- cgit v1.2.1