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

Bug #301560 reported by ivanmara on 2008-11-24
2
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
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  Edit
Everyone can see this information.

Other bug subscribers