Subject: Re: UPS unattended shutdown
To: None <dfraser@mother.com>
From: Mike Long <mike.long@analog.com>
List: port-i386
Date: 03/14/1997 17:01:38
>Date: Fri, 14 Mar 1997 16:27:43 -0500 (EST)
>From: Dan J Fraser <dfraser@mother.com>
>
>The correct list for this is sort of fuzzy...

tech-kern is probably the best choice.

>I'd like to set up NetBSD to automatically shut down my UPS during a power
>failure... monitoring the UPS is not a problem, but I need to send an
>ioctl to the serial port to tell the UPS to shut off power to the computer
>after NetBSD has shut down completely.
>
>What's the best way to implement this?  

One way is to write an LKM which registers a shutdown hook (see
shutdownhook_establish(9)) to send the message to the UPS.
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil