Description of problem:
Currently /etc/rc.d/init.d/halt has the necessary section to support "nut" but
not the bits needed for apcupsd.
Version-Release number of selected component (if applicable):
Missing apcupsd support in halt script
Give end users of apcupsd full "out of the box" experience by adding a killpower
section to /etc/rc.d/init.d/halt.
Please use the attached patch or better.
Created attachment 534395 [details]
I have cross-filled case 00564055 and 00564056 (different customers) in the
customer portal at the Red Hat Network.
Given we don't ship/support apcupsd in RHEL, I'd be inclined to leave this sort of support for halt.local. I know nut is there, but that predates the RHEL fork.
This patch is really micro and does definately not hurt any existing customers
of RHEL. See also comment #2, this issue affects paying customers.
By the way.../sbin/halt.local is NOT suitable for us in this case, because it
is unfortunately executed too early. Remounting remaining filesystems readonly
has to be performed first, otherwise it will cause some other trouble.
So, various suggestions:
- Use nut instead. That support is already integrated, and it *should* work for most of the same models, if I'm reading the support page right.
- Use halt.local. You'd need some sleep commands, which would be racy, but it may be hacked to work. (not really recommended)
- Create a custom /etc/init.d/halt script... we don't upgrade that script much, and they'd have to patch it back in place across upgrades, but it could work as a hot fix.
- The code to support nut in /etc/init.d/halt has:
# Shutdown UPS drivers
if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then
There's nothing that states that an administrator's /etc/sysconfig/ups couldn't run apcupsd shutdown comamnds when sourced in this way. (Hooray, hacks!)
Again, this is RHEL and thus IMHO not the place for such hackish suggestions,
that are either racy or not upgrade-safe. I'm not going to put such stuff on
productive machines as long as paid RHEL subscriptions are used. I will push
this further on via the customer portal now...
*** Bug 759573 has been marked as a duplicate of this bug. ***
Created attachment 548645 [details]
Content of /etc/sysconfig/ups
Hackish suggestion via Red Hat Support Team by abusing /etc/sysconfig/ups
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Previous version of initscripts did not contain support for apcupsd. This version turns off UPS in powerfail situation.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.