diff options
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 944edaaf..bc412043 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -263,8 +263,7 @@ if [ -n "${DYNCONFIG}" ]; then # DHCP likes to create duplicate routes. Fix that up. NUMDEFROUTES=`ip -o route | \ - grep "^default" | \ - awk '{ nlines++ } END { print nlines }'` + awk '/^default/ { nlines++ } END { print nlines }'` if [ -n "$NUMDEFROUTES" -a "$NUMDEFROUTES" -gt 1 ]; then # remove the default route for the new device (old route wins) ip route del default dev ${DEVICE} |