Bug 31463 - /sbin/ifup is not compatible with /bin/sh
Summary: /sbin/ifup is not compatible with /bin/sh
Status: CLOSED DUPLICATE of bug 30741
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-11 22:48 UTC by hjl
Modified: 2014-03-17 02:19 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2001-03-11 22:48:22 UTC


Attachments (Terms of Use)

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 ***


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