Debian reconsiders init-system diversity
Debian reconsiders init-system diversity
Posted Nov 19, 2019 23:40 UTC (Tue) by rgmoore (✭ supporter ✭, #75)In reply to: Debian reconsiders init-system diversity by rra
Parent article: Debian reconsiders init-system diversity
There was a giant ecosystem of random shell scripts and utilities and conventions and tools that parsed comments to discover ordering and a mess of problems that were solved and resolved by every package or every distribution independently (creating users, creating temporary directories, and so forth).
To put this slightly differently, the biggest problem with SysV init is that it fails to separate policy from mechanism. An init script is inherently about both what is supposed to happen and how to do it. Since the "how" is hard and involves lots of details to get it right, it tends to overwhelm the "what". This leads to two problems:
- Init scripts are very difficult for an inexperienced person to understand. The little bit of policy is buried in a great mess of mechanism, and it's generally written as part of the procedure rather than separated out where it's easy to understand. For example, instead of saying "this process should be run as a daemon", it includes a procedure for running it that way. This is completely opaque to someone who understands the goal but doesn't understand the mechanism.
- Getting the procedures right is really hard, but they have to be repeated in every script that does the same thing. The net result is that there are a lot of really bad init scripts out there. They are either copied and pasted, with all the drawbacks that entails, or they are rewritten from scratch, with the inevitable risk of reintroducing bugs.
systemd deals with both these problems by separating policy (unit files) from mechanism (systemd itself). Unit files are much easier to understand than init scripts, solving problem 1. And mechanisms only need to be written and debugged once in systemd for every program it's starting to benefit, solving problem 2.
Posted Nov 20, 2019 0:38 UTC (Wed)
by pizza (subscriber, #46)
[Link]
Exhibits 1-$VeryBigNumber: improper handling of variables, arguments, or data that contains spaces, leading to all sorts of joy.
Debian reconsiders init-system diversity
