https://help.ubuntu.com/community/UsbDriveDoSomethingHowto
Add 2 files if you want to do something when usb insert...
/etc/udev/rules.d/91-usbtest.rules
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{model}=="USB FLASH DRIVE ",SYSFS{vendor}==" " RUN+="/usr/local/bin/usbtest.sh"
/usr/local/bin/usbtest.sh
#!/bin/sh
echo "test" >> /tmp/usbtest.log
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment