Hi,
in order to backing up data when I connect to computer
an USB HD, I wrote the follow UDEV rule :
------------------------------------------------------------------
SUBSYSTEM=="block", ACTION=""
ATTRS{vendor}=="152d", ATTRS{model}=="0578",
SYMLINK+="external%n", RUN+="/usr/bin/mrs-auto_backup.sh"
-------------------------------------------------------------------
the rule is the content of the file :
/etc/udev/rules.d/10.autobackup.rules
that I self created .
As well I tried in many different combinations and
parameters values, never I was able to execute the script
inside the rule.
-----
In order to get the USB HD characteristic of the USB
Hard Disk to use for backing-up the data I used the
command :
<sudo udevadm info -q all -n /dev/sdc>
and its output is transcribed below
Could someone help me to understand because this rule
doesn't works ?
thank you
regards
Angelo
-------------------
features (attributes)
of the USB Hrd Disk that I got with the above
command :
[angelo_dev@localhost ~]$ sudo udevadm info -q all -n
/dev/sdc
P:
/devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.1/3-5.1.2/3-5.1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
N: sdc
L: 0
S: external
S:
disk/by-path/pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0
S: disk/by-id/usb-JMicron_Tech_DB12345681BC-0:0
E:
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.1/3-5.1.2/3-5.1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
E: DEVNAME=/dev/sdc
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=32
E: SUBSYSTEM=block
E: USEC_INITIALIZED=11404758453
E: ID_VENDOR=JMicron
E: ID_VENDOR_ENC=JMicron\x20
E: ID_VENDOR_ID=152d
E: ID_MODEL=Tech
E:
ID_MODEL_ENC=Tech\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_MODEL_ID=0578
E: ID_REVISION=0203
E: ID_SERIAL=JMicron_Tech_DB12345681BC-0:0
E: ID_SERIAL_SHORT=DB12345681BC
E: ID_TYPE=disk
E: ID_INSTANCE=0:0
E: ID_BUS=usb
E: ID_USB_INTERFACES=:080650:080662:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uas
E:
ID_PATH=pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0
E:
ID_PATH_TAG=pci-0000_00_14_0-usb-0_5_1_2_1_0-scsi-0_0_0_0
E: ID_PART_TABLE_UUID=0007fd62
E: ID_PART_TABLE_TYPE=dos
E: DEVLINKS=/dev/external
/dev/disk/by-path/pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0
/dev/disk/by-id/usb-JMicron_Tech_DB12345681BC-0:0
E: TAGS=:systemd: