Date: Fri, 10 Mar 2006 11:26:34 +0000 From: Alex Zbyslaw <xfb52@dial.pipex.com> To: Bob Johnson <fbsdlists@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: coming back up after power failure (UPS) Message-ID: <4411626A.1090808@dial.pipex.com> In-Reply-To: <54db43990603091419n73d44758ne475fc920848e43c@mail.gmail.com> References: <20060309174609.GA14114@ns.museum.rain.com> <MIEPLLIBMLEEABPDBIEGKEBHHEAA.fbsd_user@a1poweruser.com> <20060309200708.GA15255@ns.museum.rain.com> <54db43990603091419n73d44758ne475fc920848e43c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Bob Johnson wrote: >- When the UPS believes it is about to run out of battery power and >shut down, the OS shuts down to single user mode and starts a script >that will reboot the system in five minutes (or long enough to be >sure the batteries will run down first). >- If the UPS does shut down, when power is restored, the BIOS will >detect the event and power up the PC normally. It will boot as >normal. >- If the UPS never shuts down (because line power is restored) the >script eventually times out and reboots the system anyway. > >I tried to make this work a few years ago, but could find no way to >start a script after shutting down to single user mode. I posted a >query about it but got no replies, so I quit worrying about it. I've >since seen some hint that it is now possible to do that, but I didn't >follow it up. Can anyone tell me how to do that? > man rc.d :-) Every script in /etc/rc.d with a shutdown keyword will be run when shutting down with the param "stop". If your NUT shutdown script touched some special file, your rc.d script could key off that to do a reboot in 5 minutes. I thinks that's what you're describing. --Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4411626A.1090808>