Bug 31463
| Summary: | /sbin/ifup is not compatible with /bin/sh | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | hjl |
| Component: | initscripts | Assignee: | Bill Nottingham <notting> |
| Status: | CLOSED DUPLICATE | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | 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: | |||
/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.