[CentOS] Centos 6.4: Possible bug in system-config-network-cmd

Tue May 21 20:52:46 UTC 2013
Glenn Eychaner <geychaner at mac.com>

I'm having a puzzling problem with system-config-network-cmd in CentOS 6.4. I have a workstation with a number of different grub boot configurations (a spare for a set of workstations, basically), each of which has a parameter MYHOST=<hostname>, and I am using system-config-network-cmd to set the boot configuration during the network process (using a small custom system service that runs just before network startup, reads the configuration name from /proc/cmdline and calls "system-config-network-cmd -p <configname>").

I have properly disabled NetworkManager, and have /etc/sysconfig/networking/devices and .../profiles set up correctly AFAIK (it was all copied from a CentOS 5 machine, and the hand links were maintained properly as needed; such a PITA that they got rid of the very nice GUI for this).

This all works great, EXCEPT that if the machine is booted a fixed-IP profile, the the DHCP ifcfg file also winds up in /etc/sysconfig/network-scripts.  So, if I have in profiles/dhcp/ifcfg-eth0_dhcp (with a hardlink in devices/, of course):

TYPE=Ethernet
DEVICE=eth0
HWADDR=<MAC redacted>
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes

and in profiles/fixed/ifcfg-eth0_fixed

GATEWAY=x.y.z.1
TYPE=Ethernet
DEVICE=eth0
HWADDR=<MAC redacted>
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=x.y.z.n
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes

If I boot into fixed, I find that ifcfg-eth0_dhcp is also in network-scripts, and it tries to activate this interface, even though this interface is NOT in profiles/fixed in any way!  This worked great in CentOS 5, so I think I know what I'm doing here? For now, I am "fixing" the issue by running a find on network-scripts to remove inappropriate files after running systme-config-network-cmd, but that is complete cheese, of course. Is there something missing from ifcfg-eth0_dhcp that is confusing the system-config-network-cmd script? Is there any documentation on this that's helpful? And is there simply a better way to do this that I've missed?

Thanks,
-G.
--
Glenn Eychaner (geychaner at lco.cl)
Telescope Systems Programmer, Las Campanas Observatory