I’m trying to write some udev rules to automount the USB thumbdrive on the Verdex. I’m following the same pattern that was already on there for the mmc card rules. Here are my rules…
KERNEL=="sda1", ACTION=="remove", RUN+="/bin/umount /mnt/usb" RUN+="/bin/echo 'Unmounting USB'"
KERNEL=="sda1", ACTION=="add", RUN+="/bin/mount /mnt/usb" RUN+="/bin/echo 'Mounting USB'"
Now the interesting thing is that the “add” rule works and it does mount the usb thumbdrive on insertion (it previous did not do this). But the remove rule does not unmount the file system. If I just type in the console after the thumb drive has been removed “/bin/umount /mnt/usb” it does work.
Any suggestions? Also my echo statements are NOT being displayed.