Package: sysvinit
Version: 2.57b

Debian:  0.93
Kernel:  1.2.13
libc:    4.6.27

The man page for inittab(5) specifies that init looks at the file
/etc/powerstatus to determine why init received a SIGPWR (either FAIL if
a UPS signals a power outage or OK if a UPS signals that power is back).
Hence, daemons that monitor a UPS write FAIL or OK to /etc/powerstatus
before sending init a SIGPWR.

In fact, sysvinit (2.57b) looks at the file /var/log/powerstatus to
determine the nature of a SIGPWR.

Therefore, the following things could be done to "fix" this.

                                EITHER

        (1) Update inittab(5), then hack the power daemon to write to
                /var/log/powerstatus rather than /etc/powerstatus

                                OR

        (2) Hack sysvinit to look at /etc/powerstatus rather than
                /var/log/powerstatus (edit paths.h in the sysvinit source)
                and then recompile init.

Option (1) is probably the easier of the two.

Cheers, David.

Reply via email to