1 |
On Sun, 18 Mar 2012 13:25:32 -0600 |
2 |
Canek Peláez Valdés <caneko@×××××.com> wrote: |
3 |
|
4 |
> > Or, said configuration files might be corrupted; the OpenRC |
5 |
> > initscript -- if written defensively -- will be able to detect that |
6 |
> > and (perhaps) fallback to something sane. systemd can't do that, |
7 |
> > short of putting all required intelligence into a script which it |
8 |
> > executes on boot. |
9 |
> |
10 |
> That is a completely valid point, but I don't think that task belongs |
11 |
> into the init system. The init system starts and stops services, and |
12 |
> monitors them; checking for configuration files and creating hostkeys |
13 |
> is part of the installation process. If something got corrupted |
14 |
> between installation time and now, I would prefer my init system not |
15 |
> to start a service; just please tell me that something is wrong. |
16 |
|
17 |
I tend to agree. All most no daemons and services out there check that |
18 |
their config files are not corrupt. At most they do syntax |
19 |
checking, throw errors and leave it up to the caller to deal with it in |
20 |
some appropriate manner. Most often, the caller is a human with a shell. |
21 |
|
22 |
Same with sshd and all that checking that happens in the init script. |
23 |
That stuff correctly belongs in the ebuild config phase, or as an |
24 |
ad-hoc action done by the sysadmin whenever {,s}he feel like it. The |
25 |
major point being, if the software itself does not perform a certain |
26 |
check, then the launching script should also not concern itself with |
27 |
those checks. |
28 |
|
29 |
[There are exceptions of course, some stuff is brain-dead, like |
30 |
tac_plus. Nice software, but if it can't write to it's own log files, |
31 |
it silently stops working and doesn't tell you. To all intents it looks |
32 |
like it works fine, but doesn't. Presumably, openssh does not fall in |
33 |
that category of brain-dead software] |
34 |
|
35 |
-- |
36 |
Alan McKinnnon |
37 |
alan.mckinnon@×××××.com |