1 # This file contains the rules needed to create persistent device names.
3 # we are only interested in add and change actions for block devices
4 ACTION!="add|change", GOTO="persistent_storage_tape_end"
8 SUBSYSTEMS=="scsi", ATTRS{type}=="8", \
9 IMPORT{program}="scsi_id --export --sg-version=3 --whitelisted --device=$tempnode"
11 KERNEL=="sg[0-9]*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \
12 SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
14 SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end"
16 KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", \
17 ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}"
18 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", \
20 IMPORT{program}="usb_id --export $devpath"
22 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", \
23 SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", \
24 ENV{BSG_DEV}="$root/bsg/$id"
25 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", \
26 WAIT_FOR="$env{BSG_DEV}", \
28 IMPORT{program}="scsi_id --export --device=$env{BSG_DEV}"
30 KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", \
31 SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
32 KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", \
33 SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
35 KERNEL=="st*[0-9]|nst*[0-9]", \
36 IMPORT{program}="path_id $devpath"
37 KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", \
38 SYMLINK+="tape/by-path/$env{ID_PATH}"
39 KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", \
40 SYMLINK+="tape/by-path/$env{ID_PATH}-nst"
43 LABEL="persistent_storage_tape_end"