Init & SIGPWR

From: Irene A. Shilikhina <irene_at_alpha.iae.nsk.su>
Date: Tue, 14 Oct 1997 15:51:39 +0600 (NSK)

Hello DU managers,

we have DEC 2000 model 300 with DU 3.2c & APC Back-UPS 600. Since we
can't afford to use a UPS such as SMART, it's no available powerchute
soft that would fit to our circumstance. Therefore I was interested in
something about powerd written by Lynux folk. I have already written my
simplest version just to run shutdown on power failure and then to send
a signal to the UPS to shutdown it. I have prepared a customized cable.
Before starting my experiment, I tried to make sure that the init indeed
processes the SIGPWR signal as I expect.

In my DU 3.2c, according the manual on inittab, the action powerfail
specifies that if init receives the SIGPWR power fail signal,
it executes the process associated with this line.
 
I included the following string to the inittab:

pf:1234:powerfail:/bin/echo "Power problem" > /etc/mypowerfail 2>&1

and as root did :

#sync;sync;sync;kill -SIGPWR 1

... and nothing happened, /etc/mypowerfail not found.

The same was when I tried

pf::powerfail:/bin/echo "Power problem" > /dev/console 2>&1

I am under the impression that the SIGPWR is trapped by the init...
Couldn't anybody please tell me what I perceive wrong?

Thanks,
Irene.

P.S. The command "init q" I tried too.
____________________________________________________________________________
Irene A. Shilikhina (e-mail: irene_at_alpha.iae.nsk.su)
Institute of Automation & Electrometry
Novosibirsk, Russia
____________________________________________________________________________
Received on Tue Oct 14 1997 - 12:11:06 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT