Hello,
I have some questions about the ipmi.init script, in working on the bug
filed at
https://bugs.launchpad.net/ubuntu/+source/openipmi/+bug/1318317.
1) Would it make sense to only have the init-script modify the state
(loaded/unloaded) of modules if they are specified as "yes" in the
configuration file? That is, for instance, ipmi_watchdog would not be
unloaded by `service openipmi restart` if IPMI_WATCHDOG=no? Currently,
as evidenced in the bug, the function unload_all_ipmi_modules stops the
watchdog and powercontrol modules, as well as any configured IPMI
modules, which seems in contradiction to the rest of the functionality,
which does check the configuration file?
2) Why does restart() do something different than simply stop() and then
start()? That is, it feels a bit weird to have stop() then start()
result in some modules being loaded still, but a restart() result in no
modules being loaded potentially, depending on your configuration.
3) My current proposed "fix" for the afore-mentioned bug is:
diff --git a/ipmi.init b/ipmi.init
index 2ebcd94..1c2d78a 100644
--- a/ipmi.init
+++ b/ipmi.init
@@ -373,9 +373,9 @@ load_ipmi_modules ()
local locdelay
modprobe ipmi_msghandler > /dev/null 2>&1
modules_loaded ipmi_msghandler
- [ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules &&
RETVAL=$((RETVAL | 1)) && return
+ [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
load_hw_modules
- [ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules &&
RETVAL=$((RETVAL | 1)) && return
+ [ $((RETVAL & 1)) -eq 1 ] && RETVAL=$((RETVAL | 1))
if [ "${DEV_IPMI}" = "yes" ]; then
modprobe ipmi_devintf > /dev/null 2>&1
which simply makes the failure to have either ipmi_msghandler or any of
the configured hw modules load not fatal. I think RETVAL will still
reflect the issues seen during the loads. Thoughts?
Thanks,
Nish
------------------------------------------------------------------------------
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer