I'm having trouble getting my head round how hotplugged device activation should work with systemctl enable/disable.

I have a udev rule that uses ENV{SYSTEMD_WANTS}="foo@%k.service" to hook device hotplug to systemd and a template unit file for foo@.service that uses BindTo=dev-%i.device to ensure the service starts and stops properly and ExecStart=/bin/foo /dev/%i to actually manage the device.

This all works fine, but how do I allow the administrator to enable/disable this facility with systemctl? The cups example uses an indirection via cups.target, but this indirection only works because a template is not being used and a single cupsd manages all printer devices. The getty@ service can be enabled/disabled on a per-tty basis, but I want to enable/disable for all potential hotplugged devices, not ones I know the name of in advance (and I don't really understand how the getty@ stuff works anyway).

Regards,
Chris.

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to