Why UDEV ignores multiple rules for the same device?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hey, I said it was a guess. It turns out it was a wrong one however:
One device can be matched by more than one rule. This has it's practical advantages, for example, we can write two rules which match the same device, where each one provides its own alternate name for the device. Both alternate names will be created, even if the rules are in separate files. It is important to understand that udev will not stop processing when it finds a matching rule, it will continue searching and attempt to apply every rule that it knows about.
The above quote is from this site, so apparently you are allowed to do what you're trying to do. As to why yours doesn't work, try reversing the order and see if the first one is still the only one executed. According to the site I linked to, the += operator should be appending to a list of names pointing to the original device, however I suppose it is possible that by having two rules, the second time the list gets "appended" it gets wiped out and recreated instead.
i have similar problem. use udev 182.
But my problem is, i have multiple GROUP= directive on separate .rules files for the same device. one on /etc/udev/rules.d/, the other on /lib/udev/rules.d. i want the rules on /etc/udev/rules.d/ takes higher priority and then no other rules follow. This could be achieved with OPTIONS="last_rule". But newer udev seems dropped the "last_rule" directive.