4 ms·
I've used this opportunity to look at some recent init files. Here's one of the first I stumbled upon. https://github.com/NagiosEnterprises/nagioscore/blob/ma
by esarbe 3y ago
I've used this opportunity to look at some recent init files.
Here's one of the first I stumbled upon.
https://github.com/NagiosEnterprises/nagioscore/blob/master/startup/default-init.in https://github.com/NagiosEnterprises/nagioscore/blob/master/...
It's 288 lines long; the LSB dependency nonsense is 8 lines of that.
Then I looked up one for Postgres;
https://wiki.postgresql.org/wiki/Lsb_conforming_init_script https://wiki.postgresql.org/wiki/Lsb_conforming_init_script
This one is a whooping 356 lines long, LSB is again about 10 lines long, depending whether you count the header or not.
I don't think the "LSB dependency" argument holds water.
- JdeBP 3y agoThe irony is that a lot of the boilerplate from both, including that massive case...esac part, has been eliminatable for about 10 years. See https://unix.stackexchange.com/a/480897/5132 https://unix.stackexchange.com/a/480897/5132. These are not "recent" at all, which is part of the problem. The wiki page largely froze in 2010, several years before the init-d-script innovation; and the people maintaining the nagios script until around 2018 never even tried to make use of init-d-script.
- esarbe 3y agoIt might well be that most of the boilerplate is a "solved problem" - then the question becomes; is this solution used at all? Let's have a look at a recent init file, from current Debian. I again just picked the first thing that I found, which was the openldap package: https://packages.debian.org/bookworm/amd64/slapd/download https://packages.debian.org/bookworm/amd64/slapd/download This init file too is over 200 lines long. I don't know how much of this is avoidable boilerplate, but evidently the Debian package maintainers either don't know about it or they lack the resources to implement it.