I have created a udev rules which is supposed to mount a USB device, backup some datas et cleanup everything. I am actually working on a Debian server.There is the information about my usb device that I have with lsusbBus 001 Device 003: ID 054c:0243 Sony Corp. MicroVault Flash Drive(Actually the lsusb returns more Bus / Device, but I have to write them by hand since I am not posting from my Debian machine :))Then I have written my udev rule called : 10-usb_back.rulesinto: /etc/udev/rules.d/(I used 95 because the backup script takes some seconds and I want to run it as late as I can for avoiding to delay other stuff)And finally the rule itself: ACTION==add, SUBSYSTEM==usb, ATTRS{idVendor}==054c, ATTR{idProduct}==0243, RUN+=/usr/local/bin/mount_usbACTION==add, SUBSYSTEM==usb, ATTRS{idVendor}==054c, ATTR{idProduct}==0243, RUN+=/usr/local/bin/backup_databaseI have tried this too: ACTION==add, SUBSYSTEM==usb, ATTR{idVendor}==054c, ATTR{idProduct}==0234, RUN+=bash /usr/local/bin/mount_usbUnsuccessfully :(Then I restart udev sudo /etc/init.d/udev restartAnd when I plug my USB device I got this weird message: [1348.295280] sd 6:0:0:0: [sdc] Assuming drive cache: write throughtwiceBut nothing happened. No USB device mounted, no data backed up.I looked with tail -f /var/log/messageAnd the USB drive looks like detected:usb 1-3: Product Storage Media usb 1-3 Manufacturer Sony`...Something must be wrong somewhere but I don't know what, neither where :(Edit: Since I've been a little bit lazy because I can't rewrite everything from my server, please ask for further information if needed, such as the script or more logs messages :)
udev rule not working
debian;usb;udev