On Sun, Mar 18, 2012 at 01:25:32PM -0600, Canek Peláez Valdés wrote: > On Sun, Mar 18, 2012 at 5:23 AM, Pandu Poluan <pa...@poluan.info> wrote: > > > > On Mar 18, 2012 3:52 PM, "Canek Peláez Valdés" <can...@gmail.com> wrote: > >> > >> If the config file doesn't exists, the service will not start, and you > >> can check the reason why with > >> > >> systemctl status sshd.service > >> > >> And of course you can set another mini sevice unit file to create the > >> hostkeys. But I repeat: I think those tasks belong into the package > >> manager, no the init script. > >> > > > > Between installation by package manager and actual execution by the init > > system, things might happen on the required file(s). Gentoo's initscript > > guards against this possibility *plus* providing helpful error messages in > > /var/rc.log > > > > 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;
That I can agree upon. > checking for configuration files and creating hostkeys > is part of the installation process. But not this. Installation is a one-time event whose lifetime is over once installation is done. > 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. Obviously, a service itself knows best about its own config files. So *it* should check for the files and if they are invalid/non-existent, it should abort starting and notify the init system. -- Gruß | Greetings | Qapla' I forbid any use of my email addresses with Facebook services. Today’s stress is the good old times of the day after tomorrow.
pgpXsMGgDtKkX.pgp
Description: PGP signature