[systemd-devel] Requiring hardware device and escaping device names

Michael Biebl mbiebl at gmail.com
Wed Mar 26 03:59:03 PDT 2014


2014-03-26 3:56 GMT+01:00 Kai Hendry <hendry at webconverger.com>:
> On 25 March 2014 18:01, Kai Hendry <hendry at webconverger.com> wrote:
>> Requires=dev-input-by\x2did-usb\x2d13ba_0001\x2devent\x2dkbd.device
>
> On #systemd IRC I was recommended After=, and I think it's working as it should!
> After=dev-input-by\x2did-usb\x2d13ba_0001\x2devent\x2dkbd.device
>
>> Is Requires= incorrect? Is my escaping correct? Do I need to actually
>> escape in the first place?

Hm, I'm not sure if After is the right solution. What if your keyboard
is not attached during boot?
If your daemon is not functional if the hardware is not present, I'd
probably start it via a udev rule and SYSTEMD_WANTS.

In addition, if you want your service is stopped whenever the hardware
goes away, you can use BindTo in the service file


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list