Bug 90858

Summary: ifup breaks with missing default route
Product: [Retired] Red Hat Linux Reporter: Pete Zaitcev <zaitcev>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: aleksey, grunwald, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:53:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Zaitcev 2003-05-14 19:11:17 UTC
Description of problem:

If the DHCP server did not supply a default route (a standalone network),
the following happens:

[root@niphredil /]# ifup eth0
                                                                                
Determining IP information for eth0... done.
/sbin/ifup: line 268: [: : integer expression expected
[root@niphredil /]#

Version-Release number of selected component (if applicable):

[zaitcev@niphredil zaitcev]$ rpm -qf /sbin/ifup
initscripts-7.14-1
[zaitcev@niphredil zaitcev]$ rpm -q initscripts
initscripts-7.14-1
[zaitcev@niphredil zaitcev]$

How reproducible:

100%, but you have to have some unusual DHCP server configuration.

Additional info:

On some NAT boxes this happens if the Internet connection breaks,
perhaps that'll help reproducing.

Typically users notice this when GNOME refuses to start up and
posts a dialog "Cannot resolve host foo, login anyway?".

Comment 1 Pete Zaitcev 2003-05-14 19:15:23 UTC
Just so you don't have to unearth an old ifup, here's the line:

    # DHCP likes to create duplicate routes.  Fix that up.
    NUMDEFROUTES=`ip -o route | \
                  grep "^default" | \
                  awk '{ nlines++ } END { print nlines }'`
    if [ -n "$NUMDEFROUTES" -a "$NUMDEFROUTES" -gt 1 ]; then     <<==== 268
        # remove the default route for the new device (old route wins)
        ip route del default dev ${DEVICE}
    fi


Comment 2 Aleksey Nogin 2003-06-11 22:34:54 UTC

*** This bug has been marked as a duplicate of 79448 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:53:01 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.