Fitzcarraldo wrote:I agree. In addition to using Gentoo with OpenRC/ConsoleKit, I use various distributions with systemd (mainly Sabayon, Ubuntu and Lubuntu). I have more hassle with systemd. For example, I spent days trying to get systemd on my family's PC to launch a backup script at shutdown and wait for the script to run to completion before halting and powering down the PC. There are umpteen posts on the Web asking how to run a script at shutdown and/or reboot in distributions that use systemd. The unit files that most of them end up using appear to work, but only because the job is short enough that it completes before systemd reaches the end of the shutdown and/or reboot process. Take a look at the Arch Linux Forums thread controlling systemd shutdown order started by a user trying to find a way to get systemd to launch a script at shutdown (or reboot) and wait until the script completes before stopping user processes. She never got a proper answer, only that 'it is possible'.Shamus397 wrote:What a huge pile a baloney. Your bald assertion that systemd is "something which is good for the users" is completely unsubstantiated and frankly, a load of BS.axl wrote:My points are: competence beats any distro, linux is changing as a whole and all distro's finally agree on something which is good for the users, and finally gentoo should at least in the official tree keep up with everyone else and should not be the only oddity that supports openrc out of the box with huge efforts on the part of the devs. No other distro did that to their devs.
It is possible to make systemd wait for a long-running script to run to completion at shutdown -- I got a working unit file and Bash script combination in the end -- but it isn't as simple as it would seem to write a unit file to stop systemd doing so many things in parallel, and not that straightforward to discriminate between reboot and shutdown in systemd, either. On the other hand, with OpenRC you can put a Bash script in /etc/local.d/ that includes a check on the runlevel and it will be launched and will run to completion [1]. (In case anyone is wondering, you can't drop this sort of script in /lib/systemd/system-shutdown/ in a systemd distribution, because scripts in that directory are launched late in the shutdown process, after file systems have been mounted read-only.)
[1] Running a shell script at shutdown only (not at reboot) – a comparison between OpenRC and systemd
I have to commend you on your post. A real challenge. It's imho an excellent question and... I do not know how to answer it. At the moment. But I'll go look into it coz it's exciting as hell.
If I can't answer in 3 days from now, I'll return and admit defeat.




