You are not logged in.
I am trying to test whether a udev rule is applied correctly.
Here's the actual rule
ACTION=="add", SUBSYSTEM=="block", ENV{ID_MODEL}=="ADATA_IMSS316-256GD", RUN{program}+="/usr/bin/hdparm -S 0 $devpath"I modified it to verify the device path:
ACTION=="add", SUBSYSTEM=="block", ENV{ID_MODEL}=="ADATA_IMSS316-256GD", RUN{program}+="/usr/bin/echo Device path: $devpath > /tmp/test"I created the above rule in /etc/udev/rules.d/test.rules
But after a call to
# udevadm control --reload-rules && udevadm triggerThe file /tmp/test is not created.
How can I test whether the udev devpath is the correct one?
Solution:
# udevadm test /sys/class/block/sdaLast edited by schard (2022-08-25 08:22:04)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline