I've got a udev rule
ACTION=="add", SUBSYSTEM=="block", KERNEL=="vd[c-z]", ENV{DEVICE_NAME}="KERNEL" RUN+="/usr/local/bin/udevtest"
where devices vd[c-z] trigger the rule and call my script. I am trying to pass the exact name of the device that triggers the script with the $DEVICE_NAME environment variable but it doesn't seem to be being picked up by the called script.
How is this done?
I am trying to write this for Debian and Ubuntu, so I don't think udisks2 can be used.