Bug 9275

Summary: More flexible ifcfg-*
Product: [Retired] Red Hat Linux Reporter: W. Michael Petullo <redhat>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: mike, rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-09 19:40:15 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:

Description W. Michael Petullo 2000-02-09 19:40:15 UTC
The following patch (to my /etc/rc.d/init.d/netword -- version 4.70-1)
allows dots in ifcfg-* filenames.  Allowing dots in the name of the
configuration files is especially useful when using a laptop.  For
examples, two configurations could be named ifcfg-redhat.com and
ifcfg-isp.net could exist.  This is much more descriptive than ifcfg-eth0
and ifcfg-eth1.

--- network     Wed Feb  9 14:26:17 2000
+++ /etc/rc.d/init.d/network    Wed Feb  9 13:47:06 2000
@@ -34,11 +34,11 @@

 # find all the interfaces besides loopback.
 # ignore aliases, alternative configurations, and editor backup files
-interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$'
| \
+interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep
'ifcfg-[.a-z0-9]+$' | \
             sed 's/^ifcfg-//g'`
 interfaces_boot=

-for inter in `ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep
'ifcfg-[a-z0-9]+$'`; do
+for inter in `ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep
'ifcfg-[.a-z0-9]+$'`; do
       int=`egrep -L "ONBOOT=\"?[Nn][Oo]\"?" $inter | sed 's/^ifcfg-//g'`
       [ -n "$int" ] && interfaces_boot="$interfaces_boot $int"
 done

Comment 1 Bill Nottingham 2000-07-15 18:25:38 UTC
As ifcfg names are used as aliases for modules, this change wouldn't
fit in very well into how initscripts are done now. Sorry.

Comment 2 W. Michael Petullo 2009-09-13 20:14:18 UTC
I just configured a wireless adapter using NetworkManager's nm-connection-editor in Fedora 12 Alpha. The result was a configuration named ifcfg-<Connection Name>.