This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
fuss:udev [2017/07/05 19:07] – office | fuss:udev [2019/03/08 22:40] – [Reloading Udev Rules] office | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Creating Specific Rules for Devices ====== | ||
+ | |||
+ | Usually, rules are placed in files under the ''/ | ||
+ | |||
+ | To make sure that a device gets the same node under devfs via udev, rules can be added under ''/ | ||
+ | <code bash> | ||
+ | udevadm info -q all -n / | ||
+ | </ | ||
+ | |||
+ | where: | ||
+ | * ''/ | ||
+ | |||
+ | The command will output attributes, such as '' | ||
+ | |||
+ | For instance, to match and USB device with an '' | ||
+ | < | ||
+ | SUBSYSTEM==" | ||
+ | </ | ||
+ | which will: | ||
+ | * match a device connected through the USB subsystem, | ||
+ | * that has an '' | ||
+ | * and an '' | ||
+ | * as well as creating a convenient symlink in ''/ | ||
+ | * and additionally execute the command '' | ||
+ | |||
+ | |||
+ | ====== Reloading Udev Rules ====== | ||
+ | |||
+ | Remember that issuing: | ||
+ | <code bash> | ||
+ | udevadm control --reload-rules | ||
+ | </ | ||
+ | |||
+ | is insufficient and that you have to issue: | ||
+ | <code bash> | ||
+ | systemctl restart udev.service | ||
+ | </ | ||
+ | |||
+ | to make the rules effective. | ||
+ | |||
+ | ====== Trigger Action for Particular Set of Rules ====== | ||
+ | |||
+ | To trigger the '' | ||
+ | <code bash> | ||
+ | udevadm trigger --attr-match=subsystem=net --action=" | ||
+ | </ | ||
+ | |||