udev rule for matching USB class and subclass?

Felipe Sateler fsateler at debian.org
Mon Oct 10 23:26:53 BST 2016


On 10 October 2016 at 18:10, Petter Reinholdtsen <pere at hungry.com> wrote:
> [Felipe Sateler]
>> I think so. There is the the ENV{MODALIAS} attribute that you can
>> match on.
>
> Right.  I tested using this rule in Jessie and Stretch, but it did not
> work. :(
>
>   SUBSYSTEM=="usb", ACTION=="add", ENV{MODALIAS}=="usb:*ic03isc00ip*", TAG+="uaccess"
>
> Is there some documentation / examples on how to use the MODALIAS
> attribute in an udev rule?  The ones I could find only matched with ""
> or "?*", which is not quite what I want.  I suspect I am using it wrong,
> but it is hard to tell without documentation. :(

Yes the documentation is quite poor in this regard.

But, modalias may be even the wrong match. A usb thumb drive I have (I
don't have a smartcard reader) does not have a MODALIAS set (you can
see the properties with `udevadm info`), although there are
intermediate paths that do have it.

What does `udevadm info` say about the device?

-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list