Am 10.05.2015 um 18:03 schrieb Ian Campbell:
> On Sun, 2015-05-10 at 15:39 +0200, Michael Biebl wrote:
>> Am 10.05.2015 um 15:37 schrieb Michael Biebl:
>>> Am 10.05.2015 um 14:46 schrieb Ian Campbell:
>>>> Hello,
>>>>
>>>> In adding systemd unit support to the qcontrol package (#781886) I
>>>> needed to add a udev rule (60-qcontrol.rules):
>>>>         KERNELS=="gpio-keys", SUBSYSTEMS=="platform", 
>>>> DRIVERS=="gpio-keys", TAG+="systemd"
>>>>
>>>> In order to tag /dev/input/by-path/platform-gpio-keys-event for systemd,
>>>> so that the dev-input-by\x2dpath-platform\x2dgpio\x2dkeys
>>>> \x2devent.device unit works correctly and can be depended on by qcontrol.
>>>
>>> That sounds wrong. Why would you want to do that?
>>>
>>> If you want to start a service if hardware shows up, use SYSTEMD_WANTS
>>> in the rules file.
>>> If you want to stop the service if the hardware goes away, use BindsTo=
>>> in the service file.
>>
>>
>> Aside from what I already said in
>>
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781886#35
> 
> I did reread this before posting, but the SYSTEMD_WANTS approach didn't
> seem to fit, perhaps I've misunderstood it though.
> 
> BTW, I couldn't find any mention of SYSTEMD_WANTS in the bluez package.

That rule is important:
SUBSYSTEM=="bluetooth",TAG+="systemd",ENV{SYSTEMD_WANTS}+="bluetooth.target"

This means, when a bluetooth hardware shows up, systemd will activate
bluetooth.target. bluez hooks into bluetooth.target via its
bluetooth.service file:

[Install]
WantedBy=bluetooth.target


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

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to