|
|
|
|
|
by StreamBright
1862 days ago
|
|
OK I bite. Nothing is wrong with shell scripts. However, I would like to know if something _wont_ work. Shell scripts do not have this feature. You know if something does not work when you run it. There might be external dependencies missing or other very typical problems. If we have a way to push all of these to "compile time" it is an improvement. I also spent many years in the land mines of implicit overrides in shell script hells and thank you but no. As a good example you can have how people try to set JVM parameters in a big data project using shell scripts. I it is absolute insanity. Same thing in init scripts. Did you implement reload or restart? Is stop actually doing something or a noop. And so on. If there is only one thing that I could keep from systemd, it would be the use of unit files instead of shell scripts. The rest is your observations, nothing to disagree or agree with. |
|
... Does systemd?
I still have endless problems with unreliable service startup and I've read all the documentation, have done all the debugging and asked all the people I could find.
> I also spent many years in the land mines of implicit overrides in shell script hells and thank you but no.
I'm not sure what you mean by this.
> Same thing in init scripts. Did you implement reload or restart? Is stop actually doing something or a noop.
So this is linux sysvinit style init scripts, OpenRC doesn't have this issue (as far as I can tell) and definitely I've never had to ask myself any of these questions when using daemontools or runit. Maybe you should familiarize yourself with how some modern non-linux-sysvinit inits work because they're certainly extremely functional, reliable and clear.
> If there is only one thing that I could keep from systemd, it would be the use of unit files instead of shell scripts.
I've actually considered this and I think it would be incredibly trivial to make a unit file parser which you can call from a shebang which would do this kind of thing. You could even have it fork off the parser to run it unprivileged. I think I'll try writing it sometime soon. You could even integrate all the namespacing, cgroups and lots of the other features systemd provides into it.