On Sun, 18 Mar 2012 13:25:32 -0600
Canek Peláez Valdés <can...@gmail.com> wrote:

> > Or, said configuration files might be corrupted; the OpenRC
> > initscript -- if written defensively -- will be able to detect that
> > and (perhaps) fallback to something sane. systemd can't do that,
> > short of putting all required intelligence into a script which it
> > executes on boot.  
> 
> That is a completely valid point, but I don't think that task belongs
> into the init system. The init system starts and stops services, and
> monitors them; checking for configuration files and creating hostkeys
> is part of the installation process. If something got corrupted
> between installation time and now, I would prefer my init system not
> to start a service; just please tell me that something is wrong.

I tend to agree. All most no daemons and services out there check that
their config files are not corrupt. At most they do syntax
checking, throw errors and leave it up to the caller to deal with it in
some appropriate manner. Most often, the caller is a human with a shell.

Same with sshd and all that checking that happens in the init script.
That stuff correctly belongs in the ebuild config phase, or as an
ad-hoc action done by the sysadmin whenever {,s}he feel like it. The
major point being, if the software itself does not perform a certain
check, then the launching script should also not concern itself with
those checks.

[There are exceptions of course, some stuff is brain-dead, like
tac_plus. Nice software, but if it can't write to it's own log files,
it silently stops working and doesn't tell you. To all intents it looks
like it works fine, but doesn't. Presumably, openssh does not fall in
that category of brain-dead software]

-- 
Alan McKinnnon
alan.mckin...@gmail.com


Reply via email to