[systemd-devel] howto migrate some things to systemd

Michael Olbrich m.olbrich at pengutronix.de
Wed Apr 20 07:55:37 PDT 2011


On Wed, Apr 20, 2011 at 04:01:05PM +0200, Lennart Poettering wrote:
> On Wed, 20.04.11 11:24, Michael Olbrich (m.olbrich at pengutronix.de) wrote:
> 
> > > If this is for SSH keys and stuff you might even want to split this up
> > > into several units and just look for the sshd key files
> > > directly. i.e. stick in your ssh-keygen.service something like this:
> > > 
> > > ConditionFileExists=!/etc/ssh/ssh_host_rsa_key
> > > 
> > > That way are things are nice and robust. And it comes at the cost of an
> > > access() syscall. Which I think is pretty cheap.
> > 
> > Hmmm, If I do this then all such tasks would be triggered at the same time,
> > right? In contrast to the usual startup tasks this stuff is rather resource
> > intensive. Is there a way to serialize this?
> 
> Yes, absolutely. Just place "After=" or "Before=" in the unit files.

That's not possible. The services would be installed from different
packages. e.g the service to generate ssh-keys is installed with the
openssh package etc. And generating the "After=" or "Before=" in a
post-install script is rather ugly.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the systemd-devel mailing list