Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was writing a udev rule that makes use of the ID_PATH, just to make the device persistent against the port it's inserted in.

So here is what I have

  KERNEL=="ttyUSB?",SUBSYSTEM=="tty",ENV{ID_BUS}=="usb",ENV{ID_PATH}=="pci-0000:00:12.0-usb-0:1:1.0",SYMLINK="bla"

Initially, the file is called 52-foo.rules, and it doesn't work. I renamed it to 81-foo.rules and it works fine.

It's like the ENV{} values are only valid if the number are large enough. Could somebody explain why this is the case?

Thanks,

share|improve this question

1 Answer 1

Perhaps your rule is being overwritten by another rule. Since higher numbered rules run last, it doesnt get overwritten when you use a higher number.

< 60  most user rules; if you want to prevent an assignment being
overriden by default rules, use the := operator.

these cannot access persistent information such as that from
vol_id

< 70  rules that run helpers such as vol_id to populate the udev db

< 90  rules that run other programs (often using information in the
udev db)

>=90  rules that should run last

Check this

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.