Post #2251210
2026-05-06 15:31 UTC
Coworker is building a system that sits in front of kexec/shutdown/reboot/halt/etc systemd targets which calls a series of scripts out of /etc/prereboot.d/ in numerical order, so stuff like 10-service-that-has-to-drain, 20-other-service, 30-wait-for-dracut-to-finish, and so on.
I could swear I've seen a system like this somewhere before, but all these years of systemd must have erased it from my memory. #sysadmin
Replies (3)
-
@me@social.taupehat.com 2026-05-06 15:32
Also, the "wait-for-dracut-to-finish" example isn't even a joke - RHEL derivatives WILL return you to the command prompt sometimes while that's running, while DKMS modules are building, etc, and if you reboot then you're gonna have a bad time.
-
@pseudonym@mastodon.online 2026-05-06 16:05
@me@social.taupehat.com Pre systemd, that sounds like /etc/rc.d "rc" scripts had "run levels" and within each subdirectory for a run level the scripts were named with numbers 10- 20- and so on. What's old is new again.
-
@benjamineskola@hachyderm.io 2026-05-07 06:48
@me@social.taupehat.com Surely systemd has the feature already? `Before=shutdown.target` or some such.