[systemd-devel] question about system reboot and shutdown

Lennart Poettering lennart at poettering.net
Wed Aug 9 17:20:01 UTC 2017


On Mi, 09.08.17 11:28, Tilman Baumann (tilman at baumann.name) wrote:

> In my experience, the only place where you can hook in a non racy way is
> in the kernel.

I fully agree with this btw. The only safe place if the kernel does
all this. Much like most other drivers UPS drivers should be in the
kernel. That way they can hook into the only really fully correct
place.

Using an initrd is the closest thing otherwise to close the race, but
actually it's still there then, as the kernel flushes ATA buffers and
such when reboot() is invoked, and any initrd-based userspace
implementation will ultimately still race against that...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list