Red Hat Bugzilla – Bug 54737
UPS support in halt script at wrong place
Last modified: 2014-03-16 22:23:50 EDT
Description of Problem:
In one of the last statements in /etc/rc.d/init.d/halt a $MODEL -k $DEVICE
command is executed to power down the UPS (when configured). However,
these UPS-specific commands are in /usr/bin, so when you have a separate
/usr filesystem, this filesystem is already unmounted at this moment.
Conclusion: the will *never* work on any system with a separate /usr
Version-Release number of selected component (if applicable):
On any system with an UPS configured and a seperate /usr filesystem.
The command could be moved up in the script before filesystems are
unmounted. Maybe this works, but what about NFS-mounted /usr filesystems?
Or should the UPS daemons go to /bin instead of /usr/bin?
Moving the command before unmounting the filesystems doesn't work either, as
then the command (apcsmart in my case) blocks several seconds and then powers
down the UPS before the halt script proceeds... :-(.
Putting apcsmart in /bin and using the original halt script doesn't work as
expected, as it blocks a while and then indeed powers down the system, but
without any delay so that the halt script finishes correctly. It might be able
to call apcsmart in a proper way, but standard it doesn't work ok. Technically
this should be possible, as smupsd also tells a Smart-UPS to power down, but
with a 20 seconds delay.
could you please try to add -d0 into /etc/init.d/halt if it works.
if [ "$command" = halt ] ; then
if [ -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ]
[ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE"
] && $MODEL -d0 -k $DEVICE
Yes, adding -d0 seems to work fine. So, now there should be defined an
additional variable in /etc/sysconfig/ups to enable this kind of options. Maybe
the current OPTIONS should be split into OPTIONS_START and OPTIONS_HALT or so...
Closing bugs on older, no longer supported, releases. Apologies for any lack of
If this persists on a current release, such as Fedora Core 4, please open a new bug.