apcupsd inform the UPS to kill the power only when "poweroff"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: initscripts
Ubuntu 8.10
initscripts 2.86.ds1-59ubuntu13
apcupsd 3.14.4-1
on some motherboards (for example X5DE8-GG) only "Last state" and "Always OFF" is available for "Restore on AC/Power" option in BIOS.
I want automatically reboot server, when the power is restored ... therefore i must halt my system (not poweroff).
apcupsd must inform the UPS to kill the power, sending message for him ("apcupsd --killpower", whitch called from /etc/init.
"halt" script operate two modes (halt, poweroff) that are set in /etc/default/halt.
The problem:
When power cut ... apcupsd inform the UPS to kill the power only when "poweroff" mode is on (not in "halt" mode).
Solution:
in /etc/init.d/halt change string:
if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.
to:
if [ -x /etc/init.