• Dran
    link
    fedilink
    3
    edit-2
    2 months ago

    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.

    • Suzune
      link
      fedilink
      22 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.”.