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

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to