Bug 31463 - /sbin/ifup is not compatible with /bin/sh
/sbin/ifup is not compatible with /bin/sh
Status: CLOSED DUPLICATE of bug 30741
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-11 17:48 EST by hjl
Modified: 2014-03-16 22:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-11 17:48:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description hjl 2001-03-11 17:48:19 EST
/sbin/ifup has

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

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-11 21:52:33 EST

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

Note You need to log in before you can comment on or make changes to this bug.