Hallo liebe Ubuntugemeinde,
Udev bringt mich zum Verzweifeln...
Ich möchte ein automatisches Backup Skript starten, sobald ich via USB mein Motorola Milestone anschliesse, welches die Fotos des Handys auf den PC kopiert. Das skript ist ok (läuft wenn manuell gestartet).
Nur die Udev Rules funktioniert nicht.
Ich bin nach der Anleitung udev vorgegangen.
1 | ls usb -v |
gibt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | Bus 001 Device 004: ID 22b8:41db Motorola PCS Droid/Milestone (Debug mode)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x22b8 Motorola PCS
idProduct 0x41db Droid/Milestone (Debug mode)
bcdDevice 2.16
iManufacturer 1 Motorola
iProduct 2 A853
iSerial 3 0403994602003017
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 55
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4 Motorola Config 42
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 9 Motorola MSD Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 1
iInterface 10 Motorola ADB Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
|
In /etc/udev/rules.d/75-milestone_backup.rules liegt folgender Eintrag:
1 | SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0x22b8", ATTRS{idProduct}=="0x41db", RUN+="gnome-terminal -e /usr/local/milestone_backup.sh" |
Das Skript /usr/local/milestone_backup.sh hat Ausführungsrechte und funktioniert wenn manuell gestartet.
Wenn ich das Smartphone anschließe startet kein Skript.
Hat wer ähnliche Erfahrungen oder hat eine Ahnung warum?
LG th3rdster