Bug 31463

Summary: /sbin/ifup is not compatible with /bin/sh
Product: [Retired] Red Hat Linux Reporter: hjl
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-11 22:48:22 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 hjl 2001-03-11 22:48:19 UTC
/sbin/ifup has

        # set up default gateway
        if [ "${GATEWAY}" != "" -a "`ipcalc --network ${GATEWAY}
${NETMASK}`" = 
"NETWORK=${NETWORK}" ]; then
            route add default gw ${GATEWAY} ${DEVICE}
            DEFGW=${GATEWAY}
        elif [ "${GATEWAYDEV}" = "${DEVICE}" ]; then
            route add default ${DEVICE}
        fi

The problem is `ipcalc --network ${GATEWAY} ${NETMASK}` is always
evaluated with /bin/sh even if "${GATEWAY}" is "". I won't call it
a bash bug. One way to fix it is to use

`ipcalc --network ${GATEWAY} ${NETMASK} 2> /dev/null`

to get rid of error messages from ipcalc.

Comment 1 Bill Nottingham 2001-03-12 02:52:33 UTC

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