SIGPWR interrupt - upstart init with powstatd UPS daemon
Johan Kiviniemi
netsplit.com-upstart-devel at johan.kiviniemi.name
Fri Feb 16 02:21:19 GMT 2007
On Thu, Feb 15, 2007 at 06:04:35PM -0800, Will Dickson wrote:
> when the power to the UPS is cut powstatd changes the entry in
> /etc/powerstatus from OK to FAIL and sends a SIGPWR interrupt to init.
> Init is then suppose to check the entry in /etc/powerstatus etc.
> However, I couldn't seem to get the upstart init to respond to the
> SIGPWR interrupt.
Seems to me that it would be a lot cleaner to use upstart's generic way
of emitting events than teaching the specifics of UPS handling to
upstart itself.
That is, make the UPS daemon run something like
/sbin/initctl emit power-status fail -eTIMELEFT=120
/sbin/initctl emit power-status ok
and let the /etc/event.d jobs handle the event as they deem fit.
But that's only my opinion.
Sincerely,
--
Jοhan Kiviniemi http://johan.kiviniemi.name/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20070216/a025355a/attachment.pgp
More information about the upstart-devel
mailing list