Description of problem: kudzu does not remove ifcfg-ethXXX files when network device disabled Version-Release number of selected component (if applicable): kudzu-1.2.53-1.x86_64.rpm How reproducible: Always Steps to Reproduce: 1. Disable onboard NIC, reboot 2. Kudzu runs, deletes entries in modprobe.conf and hwconf correctly 3. However does not remove /etc/sysconfig/networking/ifcfg-XXXX Actual results: ifcfg-ethXXX entries are not removed Expected results: The entries should be removed from the directory. RHEL4 works this way. There is a difference between kudzu-1.2.53-1.x86_64.rpm source and kudzu-1.1.95.15-1.i386.rpm (RHEL4.3) in hwconf.c:unconfigure() @@ -1169,125 +565,12 @@ int unconfigure(struct device *dev) if (!isAliased(cf, dev->device, dev->driver)) { removeAlias(cf,dev->device,CM_REPLACE); } - snprintf(path, 256, "/etc/sysconfig/network-scripts/ifcfg-%s", - dev->device); - unlink(path); - /* r-c-network adds this file, so we need to remove it also */ - snprintf(path, 256, "/etc/sysconfig/networking/devices/ifcfg-%s" , - dev->device); - if (!access(path, F_OK)) - unlink(path); Additional info:
I'm not sure that I completely understand what the original poster intends. As a user of network profiles, I, for one, would not like kudzu to remove entries that I have placed in /etc/sysconfig/network-scripts and more importantly under /etc/sysconfig/networking/profiles and /etc/sysconfig/networking/devices. I have parked there, scripts controlling interfaces which may not be present in the current "netprofile" but which will be used when moving to a new location and switching to a new profile. Exactly what should kudzu's role be with regard to the contents of network profiles? Is the original poster proposing that entries be removed from profiles when devices don't happen to be present at a given point in time?
This behavior is changed in 1.2.54-1.
So this is working as designed for RHEL5?
As of 1.2.54-1, yes.
Kudzu should be removing the ifcfg-entries and prompting the user whenever a network card is removed or added. This will reduce confusion for customers. If the user were to disable an onboard LOM and then insert an add-in card, then reenable the LOM, the ethernet numbering will be incorrect.
It *does* remove them as of 1.2.54-1. Have you tested this?
Kudzu is still broken however. It does not launch system-config-network to add/remove network cards if they have been added/removed from the system. The following actions will cause the network configuration to become corrupt: Using my netinfo.pl script to verify config: 1. Install RHEL5 with onboard LOM, boot OS --> Ok 2. Reboot OS, disable onboard LOM, boot OS --> Ok (but no popup) 3. Reboot OS, add PCI NIC, boot OS -> Ok (but no popup) 4. Reboot OS, reenable Onboard LOM, boot OS -> Fails (no popup)
Created attachment 138617 [details] Netinfo test script Use this to verify that redhat network configuration is in sync between kernel+kudzu config files
Perhaps I wasn't clear. *There is no popup code at all, and there will not be.* Failing configurations can be tested and fixed, though.
This is a failing configuration: 1. Install RHEL5 with onboard LOM, boot OS --> Ok 2. Reboot OS, disable onboard LOM, boot OS --> Ok 3. Reboot OS, add PCI NIC, boot OS -> Ok 4. Reboot OS, reenable Onboard LOM, boot OS -> Fails The ifcfg-eth0.bak files that are saved are getting picked up by scripts that look for ifcfg-ethXXXX, and cause problems.
What scripts? Both rename_device and all the network-functions scripts ignore .bak files.
system-config-network (text mode)