This has been a very useful how-to, thanks.
I am having a bit of difficulty with something I'm trying to do, so I'm hoping to get a little more help.
I used this how-to to get a Sandisk 1GB Cruzer mounting properly. Here's what I would like to do:
I need to make sure that the Cruzer gets backed up to my HD each time it is unmounted. I am already backing it up when it mounts, using the RUN command and an ACTION of "add". I am trying to run a script when the ACTION is "remove", but that doesn't seem to happen. Here is my rules line for this:
Code:
BUS=="usb", SYSFS{product}=="Cruzer Mini", KERNEL=="sd?1",ACTION=="remove", RUN+="/usr/local/scripts/test.sh"
The script referenced in this line is just to tell me if it is working. It isn't. The scripts exists there and runs ok on its own, but doesn't run on an umount of the Cruzer.
Any thoughts? Thanks.