void-linux/void-runit

Write BOOT_TIME utmp record

Hoshpak opened this issue · 3 comments

I recently stumbled upon the fact that runit does not write a BOOT_TIME time record into utmp after booting the system. Libvirt relies on such an entry being present to determine the host boot time since version 5.7.0 and fails to start VMs otherwise.

Since runit does not provide the functionality itself, perhaps this could be implemented as part of the boot scripts? Instead of just creating the file as an empty file, one could execute a script or binary to create an initial record after booting the system.

(FWIW, I just realized we call halt -w on shutdown, but this is a noop in our halt(8)).

Writing the actual code to do this is not hard, and even musl provides the headers.