[systemd-devel] UDEV rule not matching...why?
Andrei Borzenkov
arvidjaar at gmail.com
Wed Oct 9 18:55:15 UTC 2024
09.10.2024 17:02, Daniel Spannbauer wrote:
> Hello,
>
>
> thanks for the response.
>
> My rule is in "55-my-rules.rules"
>
For SUBSYSTEM=="tty" the usb_id is called in 60-serial.rules.
> I also tried it with "ATTRS{bInterfaceNumber}" instead of the
> "ENV{ID_USB_INTERFACE_NUM} ", but also no success.
>
>
> Regards
>
>
> Daniel
>
> Am 09.10.2024 um 15:59 schrieb Mantas Mikulėnas:
>> Did you place your rules in the correct order?
>> ENV{ID_USB_INTERFACE_NUM} is set by usb_id in 50-udev-default.rules,
Only for SUBSYSTEM=="usb"
>> so it would be available in 60-foo.rules but not in 20-foo.
>>
>> On Wed, Oct 9, 2024, 16:29 Daniel Spannbauer <ds at marco.de> wrote:
>>
>> Hello,
>>
>>
>> our own device (see attachement for udevadm info --attribute-walk)
>> should have a symlink.
>>
>> Therefore I create the following udev rule:
>>
>> SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*",
>> ENV{ID_USB_INTERFACE_NUM}=="02", ATTRS{idVendor}=="1dfb",
>> ATTRS{idProduct}=="0010", SYMLINK+="2a"
>>
>> But a "udevadm test /sys/class/tty/ttyACM1" shows, that there is no
>> match, a symlink is not created. If I remofe the "ENV" pattern,
>> the rule
>> is working.
>>
>> Any idea, whats wrong here?
>>
>> System is opensuse LEAP 15.5, RPM-VErsion of UDEV is
>> 249.16-150400.8.25.7
>>
>>
>> Best regards
>>
>>
>> Daniel
>>
>>
>> --
>> Daniel Spannbauer Systemadministration
>> marco Systemanalyse und Entwicklung GmbH Tel +49 8333
>> 9233-27 Fax -11
>> Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220
>> https://www.marco.de Email ds at marco.de
>> Geschäftsführer Martin Reuter, Torsten Lukas HRB 171775
>> Amtsgericht München
>>
More information about the systemd-devel
mailing list