Ryan Kuester [2014-10-01 19:48 -0500]:
> 1. [email protected] is instantiated and started as
>    [email protected] by a udev rule when a USB drive is
>    plugged.
> 
> 2. [email protected] is instantiated and started as
>    [email protected] by virtue of being symlinked under
>    [email protected]/, the symlink coming by means of
>    enabling [email protected].
> 
> Perhaps my example isn't compelling to anyone except me :^), but is
> there a reason to squash what systemctl and systemd seem to allow?
> systemctl seems to allow enabling of templates and systemd instantiates
> them in a reasonable way.

Incidentally I was playing around with instantiated units just a few
days ago (just with 208, not with 215). While systemctl enable
[email protected] formally works with 208 (it creates a symlink), it
doesn't actually do anything, and might even wreak some havoc. grawity
says that due to that 215 doesn't even allow enabling instance
templates any more.

It seems the correct way to add dependencies to an instantiated unit
is via udev rules, like

  SUBSYSTEM=="block", [... some tests for USB ...], 
ENV{SYSTEMD_WANTS}+="automount-usb-media@$name.service"

So if you run systemctl enable [email protected], does
that really work for you? (That's essentially what init-system-helpers
would do)

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to