Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Brave Dave on February 09, 2010, 01:54:22 AM

Title: Last Power State
Post by: Brave Dave on February 09, 2010, 01:54:22 AM
I was set an interesting challenge

Standard Monitoring of UPS, power out extended so shutdown
but they want to .... have the server come back up automatically when the power comes back on

Setting BIOS to last powerstate is a pre-requisite, but..

How can I do this: if you change things you are going to get caught one way or another, use system halt instead of powerdown, what if the power doesn't go off - you are caught anyway

I'm thinking the procedure is

Then the machine will get low power at 5 minutes out and go into reboot waiting 5 minutes at grub screen, if the power goes off, last power state will kick in, otherwise it will startup from the reboot .. oh well all restarts will take 5 minutes - if they really want that

There isn't a reboot delay option, shutdown -t waits before the kill signal is sent, need a delay after the kill before the reboot
Title: Re: Last Power State
Post by: pfloor on February 13, 2010, 09:23:27 AM
Certain UPS's will completely shut down and then return power after power comes back to the mains, however...

What you are after is only possible with certian serial UPS's and is not possible with a USB UPS.

See http://bugs.contribs.org/show_bug.cgi?id=2594 for more detail.
Title: Re: Last Power State
Post by: Brave Dave on February 13, 2010, 08:56:13 PM
Thanks for you reply

The last thing to get run is /sbin/halt.local

I've:


Haven't been able to verify yet, but am fairly confident it will do the trick - and not have the adverse affect that changing the GRUB timeout would have