Subject: Re: UPS auto-shutdown in NetBSD?
To: Dan J. Fraser <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 09/03/1996 11:29:25
On Sun, 1 Sep 1996 19:59:48 -0400 (EDT)
"Dan J. Fraser " <firstname.lastname@example.org> wrote:
> I recently purchased an APC Back-UPS 400 for my NetBSD system. I am
> wondering if any automated shutdown software aready exists for NetBSD.
Hmm, I thought someone had written a UPS daemon for a particular flavor
of UPS ... I think it's fairly vendor dependent, though?
> If none does exist, I plan on writing a very simple daemon based on
> shutdown which will watch a tty for indications of the power fail, send
> walls to the users on a system informing them of the power fail and the
> impending shutdown... And then calling a modified version of 'halt' which
> will halt the system and tell the UPS to shut off power.
> Would you NetBSD experts agree that this is a reasonable method to handle
> the UPS shutdown interface?
Sounds reasonable ... Make sure you send the UPS shutoff in time ... I
can see a nasty race condition between the call to reboot(2) and write(2) :-)
-- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ --
Jason R. Thorpe email@example.com
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939