[systemd-devel] Halt then reboot

Dark Penguin darkpenguin at yandex.ru
Fri Sep 16 17:20:46 UTC 2016


Greetings!

Short version: is it possible with systemd to have the machine halt, 
wait for a few minutes and then reboot?

Long version:
Many UPS-es do not support cutting power at all, or ignore the command 
to cut the power in certain situations. There was a workaround for that: 
instead of powering the machines off, they had to halt, then wait a 
reasonable amount of time (during which the UPS should turn off), and 
then reboot - in case power came back and the UPS did not power-cycle 
its load.

Now that systemd manages the shutdown procedure, I don't know if it's 
possible to achieve the same behaviour (and thus make NUT work with 
systemd). But since it's systemd, maybe we can make this even better! 
There were some concerns that it's not a good idea to simply "halt the 
system"; what we should do is flush all the drives' cache and unload 
their heads, which can only be done *properly* from the kernel. (See 
this old Debian bug: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358696 ) So maybe with 
systemd, we can actually not simply "halt" the system, but make all the 
necessary preparations in order to ensure that cutting power is safe?


-- 
darkpenguin


More information about the systemd-devel mailing list