4 ms·
In this case "the most poorly maintained" happens to be the most used. Only on BSD have I seen rc.d scripts that are not full of redundant boilerplate. Although
by jle17 10y ago
In this case "the most poorly maintained" happens to be the most used. Only on BSD have I seen rc.d scripts that are not full of redundant boilerplate. Although of course I've not checked every distribution there is, but on those i've used and still use I find a lot of scripts that reinvent racy ways to deal with pidfiles and to let the environment of the shell from which you call the script leak into the service.
I agree that it doesn't mean that rc scripts can't be written properly, but it is a rare occurence on many distributions.
Some issues that I've had with SysV init scripts that disappear with systemd :
* a service having different fd limits when started manually than when started at boot because ulimit values leak from the shell from which you call the init script to mysqld
* a service suddenly having encoding problems because the person who restarted it used a different locale than the one who initially started it and the environment leaks
* countless scripts that fail to properly kill the process
* restart methods that randomly work because it tries to start the new process while the old one hasn't been killed
And all of those on popular distributions. All of those problems go away with systemd.
Not saying it's the ultimate solution to everything, it has it's faults and I'm open to considering other systems but SysV init had to go.
- simoncion 10y ago> Only on BSD have I seen rc.d scripts that are not full of redundant boilerplate. ... SysV init had to go. As I mentioned, this has been discussed widely elsewhere and I'm disinterested in engaging in rehash #1,020,102 of the same tired topic. But, to summarize: * If your service requires non-trivial work done as part of startup, reconfigure, or shutdown, you must use a script or other external program to get that work done as systemd's unit files will not provide the features required to help you. * Services that require complicated actions as part of startup, reconfigure, or shutdown will necessarily have complicated code to handle those actions. There is no way around this. * Only on systems that used both SysV init and SysV RC did you find that gobs and gobs of copypasta. Every distro I've seen over the past decade+ has factored out common functionality into libraries and kept copypasta in the distro-supplied init scripts to a bare minimum. [0] > ...I'm open to considering other systems... Check out OpenRC. The minimal service management script isn't much larger than the equivalent systemd unit file and is no more difficult for a complete newcomer to read. [0] Can you find egregious examples of copypasta and/or scripts that handle edge cases poorly? Sure. But you can find that stuff in any sufficiently large sample of code. Additionally, pushing the required startup scripting out from the distro maintainers to the maintainers of each individual project seems like it greatly increases the chance that a given wheel will be reinvented.
- JdeBP 10y agoThe MySQL open file descriptor limits tale is one that I hadn't heard before. If you know of a full write-up, I might add it to the list. * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh/bsd-service-command.html#Inheritance http://homepage.ntlworld.com./jonathan.deboynepollard/Softwa...