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/ifup-ippp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifup-ippp') diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp index 0defdeb6..e53cb36a 100755 --- a/sysconfig/network-scripts/ifup-ippp +++ b/sysconfig/network-scripts/ifup-ippp @@ -358,9 +358,11 @@ function addprovider() if [ "$DEFROUTE" = "yes" ] ; then route del default >/dev/null 2>&1 if [ "$GATEWAY" = "0.0.0.0" ]; then - route add default $DEVICE >/dev/null 2>&1 + route add default ${METRIC:+metric $METRIC} $DEVICE \ + >/dev/null 2>&1 else - route add default gw $GATEWAY >/dev/null 2>&1 + route add default gw $GATEWAY ${METRIC:+metric $METRIC} \ + >/dev/null 2>&1 fi fi fi -- cgit v1.2.1