Date: Thu, 5 Oct 1995 22:15:00 +0100 (MET) From: hm@altona.hamburg.com (Hellmuth Michaelis) To: owensc@enc.edu (Charles Owens) Cc: hackers@freefall.freebsd.org, msmith@atrad.adelaide.edu.au Subject: Re: Fiskars UPS support... Message-ID: <m0t0xd6-00001AC@ernie.altona.hamburg.com> In-Reply-To: <Pine.BSF.3.91.951005090952.16423G-100000@itsdsv1.enc.edu> from "Charles Owens" at Oct 5, 95 09:18:28 am
next in thread | previous in thread | raw e-mail | index | archive | help
> Mark Smith said: > > > The crucial issue in this case is, once the UPS has sounded its death knell, > > ie. power's out, and battery holdout is down to a few minutes, what should > > one do? > > > > If you decide to shutdown, and then power comes back, you're stuck > > shutdown, waiting for the power failure to reboot you. > > If you go single-user, can you arrange to have the daemon survive the > > shutdown and send an appropriate signal to the root shell when the power > > comes back? > > > > Or would it be better to reboot and then as part of the boot process wait > > for the UPS to give the all-clear? Some time ago i did such a thing for FreeBSD, the current version can be found on ftp.freefall.org in pub/FreeBSD/incoming/freebsd205ups.tar.gz. The thing consists of a device driver with which the status of the AC line is accessible, a daemon constantly monitors it and in case of a power fail it shuts the system down after a specified amount of time, leaving a file "/powerfail" and reboots. When the system comes up again, one of the very first things which is done in /etc/rc is to check whether there exists a file "/powerfail", if so, it enters a tight loop waiting for either AC power coming back or the battery becoming empty. I had to do it this way because the UPS is built-in into the machine and there are only 2 flags available: AC fail and battery OK at power up, nothing else. It works. hellmuth -- Hellmuth Michaelis hm@altona.hamburg.com Hamburg, Europe (A)bort, (R)etry, (I)nstall BSD ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0t0xd6-00001AC>