Registration of TAG+="systemd" udev rules?

Michael Biebl biebl at debian.org
Sun May 10 17:38:55 BST 2015


Am 10.05.2015 um 18:02 schrieb Ian Campbell:
> On Sun, 2015-05-10 at 15:37 +0200, Michael Biebl wrote:
>> 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?
> 
> The unit file, which was contributed upstream, contains:
> 
>         Requires=dev-input-by\x2dpath-platform\x2dgpio\x2dkeys\x2devent.device
>         After=dev-input-by\x2dpath-platform\x2dgpio\x2dkeys\x2devent.device
>         
> I had no reason to doubt it was correct, since it seemed logical that a
> daemon such depend on a device which it needs.

I think, that's the wrong way to approach it.
How do you guarantee this way, that when the daemon is started, the
hardware is present?

Requires/After will *not* wait until the hardware shows up.

It will only guarantee, that if the .device unit is already present,
when systemd calculates the initial transaction, that the service is
ordered after the .device and that the service is not started (i.e.)
fails if the device is not present.


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150510/2661c538/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list