Bug 663904
Summary: | Special symbol '#' appears in interface names and confuses scripts. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Anton Guda <atu> | ||||||
Component: | initscripts | Assignee: | Bill Nottingham <notting> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | harald, iarlyy, jonathan, linux-bugs, matt_domsch, mebrown, notting, plautrba, rvokal, shyam_iyer, the.ridikulus.rat | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | initscripts-9.23-3.fc15 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 664051 (view as bug list) | Environment: | |||||||
Last Closed: | 2010-12-17 20:05:47 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: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 664051, 664091 | ||||||||
Attachments: |
|
Description
Anton Guda
2010-12-17 09:53:13 UTC
Created attachment 469322 [details]
User symbol '_' as a separator
_ is taken in my scheme, to separate NIC partitions & SR-IOV virtual functions. I'd rather fix the scripts to allow a # in the name. Pointers to such scripts? Was this a rawhide install? I can't see a failure when using pci2#1 as an interface name, on a Fedora 14 system + biosdevname. ifup/ifdown work as expected. Can you provide pointers to the failing scripts on your system? Some of them - /etc/init.d/network from initscripts. Problem part: # bring up all other interfaces configured to come up boot time for i in $interfaces; do unset DEVICEYPE SLAVE eval $(LANG=C grep -F "DEVICE=" ifcfg-$i) eval $(LANG=C grep -F "TYPE=" ifcfg-$i) eval $(LANG=C grep -F "SLAVE=" ifcfg-$i) After this eval's error message appears: grep: ifcfg-ifcfg-pci3#1: No such file or directory Really, it seems, that some substitutions requires quoting "". But it's a too common error. Real error in in this lines : interfaces=$(ls ifcfg* | \ LANG=C sed -e "$__sed_discard_ignored_files" \ -e '/\(ifcfg-lo$\|:\|ifcfg-.*-range\)/d' \ -e '/ifcfg-[A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \ # HERE! LANG=C sort -k 1,1 -k 2n | \ LANG=C sed 's/ //') May be some another non bash-special symbol, like '@' '=' , and add it to allowed char in all scripts? Dot '.' and ':' are reserver for VLAN-s and aliases. 1) the fact that it's grepping ifcfg-ifcfg-pci3#1 (note the duplicate ifcfg parts of the name) is a problem. I've never seen that before. 2) sounds like an initscripts problem. Re-assigning. I agree the sed you note with #HERE will need adjustment to accept the new separator # in the match. Initscripts patch to add # fixes it: diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 482bb7b..b31060b 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -46,7 +46,7 @@ cd /etc/sysconfig/network-scripts interfaces=$(ls ifcfg* | \ LANG=C sed -e "$__sed_discard_ignored_files" \ -e '/\(ifcfg-lo$\|:\|ifcfg-.*-range\)/d' \ - -e '/ifcfg-[A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \ + -e '/ifcfg-[A-Za-z0-9#\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \ LANG=C sort -k 1,1 -k 2n | \ LANG=C sed 's/ //') rc=0 On my system, this results in the interfaces being properly found: em1 em2 pci2#1 Created attachment 469405 [details]
0001-add-as-a-valid-characer-in-network-device-names.patch
initscript patch
Thanks for the patch, building. |