From c3c42594656687b4cd38d81bca9d5841e65ba4d9 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 2 May 2003 16:45:22 +0000 Subject: kill one extraneous grep (#90001, ) --- sysconfig/network-scripts/ifup | 3 +-- 1 file changed, 1 insertion(+), 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} -- cgit