Re: RFC: OpenRC as Init System for Debian
On Wednesday 09 May 2012, Gergely Nagy wrote:
> > Apart from the fact that requirements will be different on
> > different systems. Putting functionality for all possible corner
> > cases into the daemon is not sensible for any upstream.
> That is what configuration files and similar things are for, I
> I'd love to see an example where a complex init script is needed,
> and that can't be easily turned into systemd service files (for
> example). So far, I was told of two cases where the init script
> does more than a simple unit file does: one was nbd-client, which
> does funky stuff I dared not try to understand last night, the
> other is every package that supports starting multiple instances
> of the same service.
For example, the apache2 init script starts htcacheclean if and only
if mod_disk_cache is enabled. While this could arguably be considered
as an upstrem deficiency, such cases won't simply disappear because
systemd becomes more common. And fixing this in the daemon as part of
a packager's work is not feasible. And with my upstream hat on, I
would rather spend my time on fixing real bugs than things that can be
easily worked around by the init script (or the apachectl script).
Also, the apache2 init script creates various required directories on
volatile file systems like /var/run or /var/lock and supports multiple
running instances, but these are more common problems.
> The latter isn't hard to convert to systemd, and will even be
> simpler, as far as I see.
> > And the integrator/packager may not want to learn all the funny
> > languages that daemons can be written in (ocaml, haskell, java,
> > ruby, ...). Besides, init scripts are conf files on Debian for
> > good reasons.
> So are unit files and configuration files. If the daemon can't be
> configured and started properly without an init script's help, then
> something's very broken.
> Exceptions do exist, of course, but that falls under the
> 'absolutely necessary' label.
> I'd love to hear about examples though. If for nothing else, than
> to try my hands at making them work with systemd, it sounds like
> an amusing challenge.