Reputation: 2141
Here is a simple rule I created in /etc/udev/rules.d/70-persistent-cd.rules:
ACTION=="remove", ENV{DEVTYPE}=="usb_device",
ATTRS{serial}=="NA453QQS", SUBSYS\
TEM=="usb", RUN+="~/1/linux/MyCode/Code/run.sh"
The run.sh is pretty simple and uses insmod and rmmod to insert and remove a module from kernel.
Now my external drive is added and remove but the run.sh fails to run. What is the problem here?
I have looked at documentation as well as this question here. I am using a Debian machine.
Upvotes: 0
Views: 408
Reputation: 86
You should not use the tilde since your HOME directory is not set. Use an absolute PATH for the run.sh program
Upvotes: 1