Why UDEV ignores multiple rules for the same device?
I have created two experimental rules for one device sda1.
Code:
KERNEL=="sda1", \ Only one, first symlink is created. Why the second is ignored? OK, I know that it is possible to put two link names in one SYMLINK key (SYMLINK+="pendr-eqe pendr-eqs"), but I would like to know why the first method doesn't work. My udev version is 0.125-6 from Debian. |
A complete guess on my part, but I suspect that udev simply executes the first rule it find that matches the device and doesn't look for other rules that may match.
|
Quote:
|
Hey, I said it was a guess. It turns out it was a wrong one however:
Quote:
|
Independently of the order of rules, after reloading database and running udevadm test, only the first rule is executed.
Maybe this behaviour of udevd is a small bug. I should test a present or the recent version on another distro. Sorry if my post sounded like I think that your comment would be statement, not supposition. I am still a beginner in writing English ;) This may be cause of many misunderstandings in the future. |
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. Is there any other way ? |
All times are GMT -5. The time now is 05:15 PM. |