You're ignoring that complexity was added to every single init script. Every init script had its own potential bugs, issues, race conditions, dependency logic, etc etc.
Now you're moving it to one single master system.
No, it's not "magically going away". The repetition is going away. The code duplication of an extremely complex system is going away.
depend() {
need localmount
after bootmisc
}
reload() {
ebegin "Reloading configuration"
start-stop-daemon --signal HUP --pidfile ${pidfile} ${command##*/}
eend $?
}To provide the features "just" the init replacement part of systemd provides isn't even possible with most other inits, no matter how you write your script.
I'm not even sure where to begin when addressing a comment like this. You're biased against systemd in the first place so I don't see the point in discussing this.
It's really amusing that basic software engineering principles are thrown out of the window the moment things get political.
Things get political that very second back then when systemd crowd started pushing their agenda to the masses using strategies like gentle push.
. filename or source filename allow one script to effectively import another. This means that the various logic can live in one place and be reused.
In trivial case, it's simple in any modern distro [1]
In non-trivial case, it's complicated. And the complexity is not going away, all you can do is move the complexity to one corner or another.
When you add the complexity to the shell script, it's right there, plain and clear.
When you move the complexity to systemd, it's not magically goes away - it just moves to thousands of lines of C code (of not the best quality on this planet, to say the least).
[1] https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscript...