Bug 30741
| Summary: | cryptic "ipcalc: netmask expected" error | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Hunter Matthews <thm> |
| Component: | initscripts | Assignee: | Bill Nottingham <notting> |
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
| Severity: | low | 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-06 19:06:33 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: | |||
You don't have a gateway set. Is that intentional? Yes. Its a local only network, with no connection (not even a modem) to the outside world. What is GATEWAY getting set to in that script? BUGZILLA IS HAVING A BAD DAY. Text has been lost in this bug - twice now I've seen the midair collision error. ----------------------------------------------------------------------------- Bill, in answer to your question of "Is $GATEWAY being set at all?" The answer is no, which is why ipcalc is erroring out - its not seeing two variables like it expects. As a workaround, I can set a fake $GATEWAY, but I still claim thats a bug in the script (not handling a missing var with a most explicit error message). But its not a major bug in any case. That's what's confusing me. The case where there is no $GATEWAY should be caught by the check if [ "$GATEWAY" != "" ... ] Will be fixed in 5.71-1. |
/etc/sysconfig/network ----------------------- NETWORKING=yes HOSTNAME=jade.biology.duke.edu /etc/sysconfig/network-scripts/ifcfg-eth1 ----------------------------------------- DEVICE=eth0 BOOTPROTO=static ONBOOT=no IPADDR=10.0.0.3 NETMASK=255.255.255.0 When I do a ifup eth1, I get ipcalc: netmask expected yet it brings the interface up just fine. Same config files under 6.2/7.0 produced no error/warning. echo's put in the ifup script show that the ipcalc that is doing this is the one here: if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then # set up default gateway echo 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 echo end GATEWAY fi but as that ipcalc call is the same as one before. Some goofy echo's in there show that the NETMASK variable is getting set, but I don't know why ipcalc isn't "seeing" it. (For reference, this laptop doesn't have 2 ethernet interfaces - I use eth1 as an alternate config file for a different network.) If you need more info, please email.