Using the serial interface Apcups should first shutdown the system (which it does) then kill the power to the APC UPS (which the Gentoo implementation does NOT do). In LFS I have made a script which run right before sytem halt which does this. RH and others modify the halt script. In Gentoo I don't fully understand the shutdown sequence to know what to modify. The problem is sever on remote servers that will NOT come back on line after a power loss but need operator attention. Reproducible: Always Steps to Reproduce: 1.Emerge apcups on a Gentoo system 2.Have a APC Ups connected via the serial cable and /etc/apcupsd/apcusd.conf properly configured 3. Disconnect the UPS from the power source Actual Results: The sytem shutdowns properly to the "Power Down" state. Power continues to the APC UPS system. When power returns the system remains in the "Power Down" state. Expected Results: After sytem reaches the "Power Down" state and a delay of about 60 seconds the killpower command should be sent to the APC UPS. When input power is restored to the UPS the sytem should power back up. The details of apcupsd operation and how it works on other OS can be found in the Apcupsd Manual: http://www.sibbald.com/apcupsd/manual/index.html
Hi there. Can you attach that LFS script and I'll see what I can do (yes, drobbins just got an APC UPS) :)
Until this bug is fixed, I just tried a workaround. Add these 4 lines to your /etc/local.stop file: if [ -f /etc/apcupsd/powerfail ] ; then echo "Powering off UPS..." /etc/apcupsd/apccontrol killpower fi The killpower command takes a few seconds to execute, so I'm not sure a 20 seconds grace period would be enough to let the system shutdown completely.
see also bug #25962
this is already/now in /etc/init.d/halt :)
wow, that's great, thanks