Bugzilla – Bug 118199
hwup and hwdown exit successfully if module is not found
Last modified: 2007-06-05 09:37:33 UTC
hwup and hwdown report errors if they do not find the module to load/unload, that's fine. But the exit code should not be zero. This prevents yast from reporting the problem (bug 102541). Found on SLES9 SP2 and SL10 Beta 2. medusa:/etc/sysconfig/hardware # hwdown hwcfg-bus-pci-0000\:00\:0b.0new FATAL: Module tulipan not found. ERROR: Could not unload module 'tulipan' for device 'hwcfg-bus-pci-0000:00:0b.0new' medusa:/etc/sysconfig/hardware # echo $? 0 medusa:/etc/sysconfig/hardware # hwup hwcfg-bus-pci-0000\:00\:0b.0new hwup: Loading module 'tulipan' for device 'hwcfg-bus-pci-0000:00:0b.0new' FATAL: Module tulipan not found. medusa:/etc/sysconfig/hardware # echo $? 0
In NLD (SLES9 and up to 9.3) hwup is also called from pci.agent. And if hwup returned there with !=0 pci.agent will proceed in looking for a matching module and will load that. So with return value == 0 we have no module loaded at boottime and with return value != 0 we might end up with a wrong module. In the second case you won't probably notice the broken hwcfg-file. So i wont fix that for older releases. Since 10.0 we don't have pci.agent anymore and hwup is always called directly. So i will fix that for upcoming releases.
Christian: You might have assigned this bug by accident to samba-maintainers.
Stefan Scheler (trainee) is currently working on hwup and will fix this.
hwup will now return != 0 if modprobe did not succeed.