aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-plip
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-05-10 00:08:02 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-05-10 00:08:02 +0000
commit906238c891d3f02b4c706457783694e3a01d91ce (patch)
tree4e2003e9100435d47a727d23dfdcb3f182b987f7 /sysconfig/network-scripts/ifup-plip
parent3bd074fd404b4863d811d0a50e9ef484523c6b57 (diff)
downloadinitscripts-906238c891d3f02b4c706457783694e3a01d91ce.tar
initscripts-906238c891d3f02b4c706457783694e3a01d91ce.tar.gz
initscripts-906238c891d3f02b4c706457783694e3a01d91ce.tar.bz2
initscripts-906238c891d3f02b4c706457783694e3a01d91ce.tar.xz
initscripts-906238c891d3f02b4c706457783694e3a01d91ce.zip
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.
Diffstat (limited to 'sysconfig/network-scripts/ifup-plip')
-rwxr-xr-xsysconfig/network-scripts/ifup-plip6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-plip b/sysconfig/network-scripts/ifup-plip
index c7c6bb88..dc766aa8 100755
--- a/sysconfig/network-scripts/ifup-plip
+++ b/sysconfig/network-scripts/ifup-plip
@@ -14,10 +14,10 @@ fi
ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP}
route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}
-# this is broken! it's only here to keep compatibility with old RH sytstems
+# this is broken! it's only here to keep compatibility with old RH systems
if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]
then
- route add default gw ${GATEWAY} metric 1 ${DEVICE}
+ route add default gw ${GATEWAY} metric ${METRIC:-1} ${DEVICE}
fi
. /etc/sysconfig/network
@@ -25,7 +25,7 @@ fi
if [ "${GATEWAY}" != "" ]; then
if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
# set up default gateway
- route add default gw ${GATEWAY}
+ route add default gw ${GATEWAY} ${METRIC:+metric $METRIC}
fi
fi