this post was submitted on 19 Apr 2024
886 points (98.8% liked)

linuxmemes

20688 readers
1131 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 4 months ago* (last edited 4 months ago) (1 children)

There is also the argument that it's more complicated under the hood and harder to troubleshoot, particularly because of it's inherent parallelism and dependency-tree design, whereas initv was inherently serial. It was much more straightforward to pick the order in which services started and shut down on an initv system.

For example, say I write a service and I want it to always be the first service stopped during a shutdown, and I want all other services to wait for it to stop before shutting down. That was trivial to do on an initv system, it's basically impossible on systemd.

For those wondering, yes I did run into this situation. My solution was clobbering the shutdown, poweroff, and restart binaries with scripts earlier in path search that stop my service, verify that they're stopped, and then hook back to systemd to do the power event.

[โ€“] [email protected] 2 points 4 months ago

I had numerous situations where systemd didn't let me abort a hanging service startup during boot or stop during shutdown.

So what do I do now, systemd? Wait till infinity??

That never happened while using other init systems. Because they simply fail properly ("sorry I did my best to stop this, I needed a SIGKILL finally"). Or simply let me log in: "sorry, some services failed to start and now it's a huge mess, but at least you can log in and fix it.".