Originally posted by NotMine999
View Post
So init scripts have not been written in plain old shell script for over 20 years now. Instead you have basically every init script in sysvinit, openrc and upstart calling /lib/lsb/init-functions or it past name results in all those functions in there shoved into the environmental variable storage that bleeds across when services are started so meaning you are not memory effective. Of course the init script is writing in mostly LSB function calls so the person who writes the init script really does not understand how to debug shell script at all.
Basically its not most maintainers involved in systemd-based distributions don't know how to debug shell scripts. The reality is most maintainers is all distributions no matter the init system they use don't really know how to debug shell scripts. Systemd distributions are not a special case.
Shell script has been a horrible round peg square hole for service management patched over by even more shell script that still don't fix that its a round peg in a square hole instead add even more creative ways to screw it up silently
Even if you look at the bsd init solution you will see another include this file to provide basic functionality so you don't have to know how to debug shell script. So this lack of maintainer knowledge to debug shell scripts even extends to your BSD based distributions.
So the idea that init scripts run by shell script means maintainers understand shell scripts is a totally bogus idea. The one who write the assist shell script knows shell script the remainder are lambs following the flock and hoping it works. This is why systemd doing this stuff in C I don't see a large problem with this way it does not leak into the environmental space and the other maintainers really did not have the skill to work on the master part anyhow in most cases.
Comment