On Mon, Jul 21, 2014 at 3:18 PM, Ralf Jung <p...@ralfj.de> wrote:
> I also tried to figure out how to manually create an appropriate
> "systemd-cryptsetup@" instance so that I wasn't restricted by the
> crypttab generator (and could control the dependencies myself), but I
> couldn't figure out how to tell such an instance the necessary
> parameters (like the keyfile). I couldn't even find the
> "systemd-cryptsetup@.service" template file. It seems to me that I
> either misunderstood that template stuff, or there's special magic going
> on for this template.

When "foo@bar.service" is accessed, systemd first searches for the
exact name "foo@bar.service", and only then for "foo@.service", to
allow certain instances to be customized.

Since systemd-cryptsetup@.service is only used through the cryptsetup
generator, and since there are quite a few parameters (all of which
really couldn't fit within a single "instance" value), the generator
uses this feature and creates a separate unit with the right
parameters for each instance, so systemd never needs to fall back to
looking for the template unit.

Look in /run/systemd/generator for the output of all generators. Use
the generated systemd-cryptsetup@*.service units as base for your
custom ones. (The administrator overrides in /etc always take priority
over generated and package-distributed units in /run and /lib.)

-- 
Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to