apcupsd inform the UPS to kill the power only when "poweroff"

Bug #301560 reported by ivanmara
2
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.d/ups-monitor) and do "halt" script when power cut.

"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.d/ups-monitor ]

to:

if [ -x /etc/init.d/ups-monitor ]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.