Open crabbedhaloablution opened 4 years ago
@udeved That's cool. I'll add the files for that. I'm puzzled how you can guarantee "Immediately before executing the actual system poweroff/reboot elogind will run all executables in /lib/elogind/system-shutdown" -- I thought elogind would be stopped at least after mount-ro. I still think it would be useful to have this functionality directly in openrc. Dbus and elogind is a bit much for the embedded world.
@crabbedhaloablution would adding a script/service to the shutdown runlevel with depend { after * }
not suffice?
Provide a last-minute hook similar to /usr/lib/systemd/system-shutdown/, sitting after the shutdown runlevel, before physical poweroff.
Use-case: I have an (out of warranty) board that only turns off in a most peculiar way. First you have to write some special magic to a special device, then reboot. Upon reboot, firmware detects the magic, clears the special device and turns off the board. Having somewhere I can hook in and know whether it's a halt, poweroff or reboot that's happening would be very helpful.