4 ms·
Maybe this is naive, but can't that repeated logic be put into a shared library (or a shared helper script)? A common, shared service for starting services reli
by lmm 13y ago
Maybe this is naive, but can't that repeated logic be put into a shared library (or a shared helper script)? A common, shared service for starting services reliably, logging them coherently, managing service dependencies, and restarting failed services seems like a great idea. But PID 1 doesn't seem like the right place for them.
- FooBarWidget 13y agoThey can, and init systems already do that. Init scripts import a common library with functions for starting and stopping daemons etc. However the result is still a big mess. Libraries are not frameworks, so you still end up with tons of boilerplate code everywhere. Take a look at /etc/init.d/* and see whether you can make sense of things at a glance. Furthermore, SysV init is not designed for service supervision, so SysV init scripts cannot implement that functionality.
- d0 13y agoYou're right. But there are several concerns here. The whole thing is a bunch of concerns crudely bundled into one concern inside a single package in systemd. This is already done in another operating system where it is successfully broken down into components which are exposed through a system-wide common RPC and component architecture so notifications and instructions can be moved around seamlessly. The whole thing is covered by ACLs, privilege separation, has immutable logging and a configuration database to drive it all. Oh and it's about 20 years old now. And it works really well. I'll let you guess the vendor (and no it's not Apple).