Bug 114548
Summary: | ifup-routes no longer allows comments in route definition files | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Nick Strugnell <nstrug> | ||||
Component: | initscripts | Assignee: | Miloslav Trmač <mitr> | ||||
Status: | CLOSED DUPLICATE | QA Contact: | Brock Organ <borgan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3.0 | CC: | dag, link, notting, oggust | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | RHBA-2005-607 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-05-01 21:57:29 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: | |||||||
Attachments: |
|
Description
Nick Strugnell
2004-01-29 14:23:33 UTC
This is still present as of RHEL4 as well as initscripts-8.07-1 in Fedora Core Rawhide today. Bug #154353 deals with a superset of this issue and has a possible patch. Created attachment 112994 [details]
patch for this issue
Please try the attached.
Fixed in 7.31.24.EL-1 for RHEL 3. Fixed in 7.93.14.EL-1 for RHEL-4. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-606.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-607.html Does this errata fix it only for old-style route-<if> files ? I am still not able to add comments on a new-style route-<if> on RHEL3AS U7. One of the advantages of text config-files on Unix, is that one can add comments in configuration files in order to work together much more efficiently. For each comment like: ### Route to NTP servers (ntpserver1 and ntpserver2) 1.2.3.0/24 via 4.3.2.1 I see an error like: Apr 12 14:29:33 server1 ifup: Error: an inet prefix is expected rather than "###". Apr 12 14:29:33 server1 ifup: RTNETLINK answers: No such device Just to clarify: The excerpt you showed is from an old-style file. New ones look kind of like the ifcfg-<if> files, with entries like ADDRESSn=<network> NETMASKn=<network/prefix mask> GATEWAYn=<next-hop router/gateway IP address> But anyway, I can reproduce your problem as well on RHEL3 RHEL 4 (where I can't reproduce it) has # older format while read line; do if [[ ! "$line" =~ '^[[:space:]]*(\#.*)?$' ]]; then /sbin/ip route add $line fi done < "$file" and RHEL3 has # older format while read line; do if [ "$line" == "${line##[[:space:]]*\#}" ]; then /sbin/ip route add $line fi done < "$file" bash in rhel3 hasn't got the "=~" operator, so it's not that easy though. /August, also ran into this, the original bug report stems from an install RH did here. I suspect that just changing it to: if [ "$line" == "${line##\#}" ]; then ... as in the original patch will fix it for you? Works for me. /August. *** This bug has been marked as a duplicate of 190395 *** |