Works for me with Martin's /lib/udev/rules.d/61-mobile-action.rules, though I'm confused as why the same thing in /etc/udev/rules.d won't work. I debugged it with logger it, and it logs _after_ I unplug the usb stick:
Mar 11 18:25:23 Tellervo kernel: [21277.948097] usb 1-1: new high speed USB device using ehci_hcd and address 53
Mar 11 18:25:23 Tellervo kernel: [21278.093654] usb 1-1: configuration #1 chosen from 1 choice
Mar 11 18:25:23 Tellervo kernel: [21278.113217] scsi55 : SCSI emulation for USB Mass Storage devices
Mar 11 18:25:28 Tellervo kernel: [21283.119408] scsi 55:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
Mar 11 18:25:28 Tellervo kernel: [21283.145377] sr1: scsi-1 drive
Mar 11 18:25:28 Tellervo kernel: [21283.145908] sr 55:0:0:0: Attached scsi generic sg1 type 5
Mar 11 18:25:44 Tellervo kernel: [21299.086685] usb 1-1: USB disconnect, address 53
Mar 11 18:25:44 Tellervo logger: /usr/bin/eject sr1
But, the one in /lib/udev/rules.d now works, and I'm happy to announce that udev works strangely, and I'll just give up trying to understand it ^____^
Works for me with Martin's /lib/udev/ rules.d/ 61-mobile- action. rules, though I'm confused as why the same thing in /etc/udev/rules.d won't work. I debugged it with logger it, and it logs _after_ I unplug the usb stick:
/etc/udev/ rules.d/ 49-ZTE. rules:
ENV{ID_CDROM}=="1", ENV{ID_ VENDOR_ ID}=="19d2" , ENV{ID_ MODEL_ID} =="2000" , RUN+="/ usr/bin/ logger /usr/bin/eject %k"
tail -f /var/log/messages:
Mar 11 18:25:23 Tellervo kernel: [21277.948097] usb 1-1: new high speed USB device using ehci_hcd and address 53
Mar 11 18:25:23 Tellervo kernel: [21278.093654] usb 1-1: configuration #1 chosen from 1 choice
Mar 11 18:25:23 Tellervo kernel: [21278.113217] scsi55 : SCSI emulation for USB Mass Storage devices
Mar 11 18:25:28 Tellervo kernel: [21283.119408] scsi 55:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
Mar 11 18:25:28 Tellervo kernel: [21283.145377] sr1: scsi-1 drive
Mar 11 18:25:28 Tellervo kernel: [21283.145908] sr 55:0:0:0: Attached scsi generic sg1 type 5
Mar 11 18:25:44 Tellervo kernel: [21299.086685] usb 1-1: USB disconnect, address 53
Mar 11 18:25:44 Tellervo logger: /usr/bin/eject sr1
But, the one in /lib/udev/rules.d now works, and I'm happy to announce that udev works strangely, and I'll just give up trying to understand it ^____^