diff options
author | Miloslav Trmac <mitr@volny.cz> | 2006-05-10 00:08:02 +0000 |
---|---|---|
committer | Miloslav Trmac <mitr@volny.cz> | 2006-05-10 00:08:02 +0000 |
commit | 906238c891d3f02b4c706457783694e3a01d91ce (patch) | |
tree | 4e2003e9100435d47a727d23dfdcb3f182b987f7 /sysconfig/network-scripts/ifup-ppp | |
parent | 3bd074fd404b4863d811d0a50e9ef484523c6b57 (diff) | |
download | initscripts-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-ppp')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ppp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp index ef6c81b9..eb749fc4 100755 --- a/sysconfig/network-scripts/ifup-ppp +++ b/sysconfig/network-scripts/ifup-ppp @@ -105,9 +105,11 @@ fi if [ "${DEFROUTE}" != no ] ; then # pppd will no longer delete an existing default route # so we have to help it out a little here. - DEFRT=`ip route list | awk '/^default / { print $3 }'` - [ -n "${DEFRT}" ] && echo $DEFRT > /etc/default-route - route del default >/dev/null 2>&1 + DEFRT=$(ip route list match 0/0) + [ -n "${DEFRT}" ] && echo "$DEFRT" > /etc/default-routes + echo "$DEFRT" | while read spec; do + ip route del $spec; + done opts="$opts defaultroute" fi if [ "${PEERDNS}" != no ] ; then |