1 |
On Sun, Mar 18, 2012 at 5:23 AM, Pandu Poluan <pandu@××××××.info> wrote: |
2 |
> |
3 |
> On Mar 18, 2012 3:52 PM, "Canek Peláez Valdés" <caneko@×××××.com> wrote: |
4 |
>> |
5 |
>> If the config file doesn't exists, the service will not start, and you |
6 |
>> can check the reason why with |
7 |
>> |
8 |
>> systemctl status sshd.service |
9 |
>> |
10 |
>> And of course you can set another mini sevice unit file to create the |
11 |
>> hostkeys. But I repeat: I think those tasks belong into the package |
12 |
>> manager, no the init script. |
13 |
>> |
14 |
> |
15 |
> Between installation by package manager and actual execution by the init |
16 |
> system, things might happen on the required file(s). Gentoo's initscript |
17 |
> guards against this possibility *plus* providing helpful error messages in |
18 |
> /var/rc.log |
19 |
> |
20 |
> Or, said configuration files might be corrupted; the OpenRC initscript -- if |
21 |
> written defensively -- will be able to detect that and (perhaps) fallback to |
22 |
> something sane. systemd can't do that, short of putting all required |
23 |
> intelligence into a script which it executes on boot. |
24 |
|
25 |
That is a completely valid point, but I don't think that task belongs |
26 |
into the init system. The init system starts and stops services, and |
27 |
monitors them; checking for configuration files and creating hostkeys |
28 |
is part of the installation process. If something got corrupted |
29 |
between installation time and now, I would prefer my init system not |
30 |
to start a service; just please tell me that something is wrong. |
31 |
|
32 |
However, it's of course debatible. I agree with systemd's behavior; |
33 |
it's cleaner, more elegant, and it follows the Unix tradition: do one |
34 |
thing, and doing it right. |
35 |
|
36 |
Regards. |
37 |
-- |
38 |
Canek Peláez Valdés |
39 |
Posgrado en Ciencia e Ingeniería de la Computación |
40 |
Universidad Nacional Autónoma de México |