4 ms·
If you had that much trouble with init scripts, the problem wasn't the scripts.
by peterwwillis 9y ago
If you had that much trouble with init scripts, the problem wasn't the scripts.
- tdumitrescu 9y agoWho doesn't love cleaning out stale pidfiles? That's why we get those big SV $$$.
- Rjevski 9y agoYes sure, the problem is me for wanting to spend more time with my friends & family instead of pulling my hair out until 3am to make those damn initscripts work.
- jjoonathan 9y agoThen why do all production init scripts for the simplest conceptual tasks always seem to be full of hacks (magic comments and files to declare dependencies, polling, cross-script communication, special cases, tons of comments referencing bugfixes to explain the crazy shit the script has to do, etc)?
- peterwwillis 9y agoSome of those are just things you find in any code (comments aren't bad), some of it refers to specific programs (there will always be 'special cases' if a program supports more modes of operation than "start" and "stop"), some of it is good (bugfixes are not bad), and sometimes init scripts are written by morons. Sometimes the code is bad. But the model isn't bad. People sometimes use "init script" to refer to the tools that run and maintain network services, and those are completely different. An init script boots your computer. A service runner is responsible for interfacing with an application and performing complex operations. They should not be confused, but often are, as Systemd conflates the two.
- bkor 9y agoThe model of how the init scripts worked is terrible. There's no cross distribution bug fixing of those scripts. It's something added by the distribution. If there's an upstream script, it's often buggy. Or it didn't integrate with the 'speed init scripts up hacks' that various distributions were doing. Huge time sink for no particular gain.
- deleted 9y ago[deleted]
- bkor 9y agoThose scripts were different per distribution. Sometimes shared, but then had to be copied basically manually from one distribution to the other. With systemd it's just a configuration file shipped by upstream. Any fixes automatically get reused by all distributions. The init scripts differed way too much across distributions. This including pointless differences in where various files are located. All of that has become way more standard, thankfully. I did have various issues with a few init scripts of my distribution. It didn't happen often, but nowadays you usually can do with a config file, way easier.