]> err.no Git - systemd/commitdiff
rules: tape rules - add nst to by-path/ links
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 11 Jul 2008 07:53:33 +0000 (09:53 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 11 Jul 2008 07:53:33 +0000 (09:53 +0200)
etc/udev/rules.d/60-persistent-storage-tape.rules
etc/udev/rules.d/60-persistent-storage.rules

index ce9e7bbbc2489817357c40db7ff82910a072c1ae..d3226f132072815214e8aab6a70fceb165f005ea 100644 (file)
@@ -11,15 +11,14 @@ SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end"
 
 KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"
-
 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", ENV{BSG_DEV}="$root/bsg/$id"
 KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", WAIT_FOR="$env{BSG_DEV}", IMPORT="scsi_id --whitelisted --export --device=$env{BSG_DEV}", ENV{ID_BUS}="scsi"
-
 KERNEL=="st*[0-9]",  ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
 KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
 
-# by-path (shortest physical path)
-KERNEL=="st*[0-9]", IMPORT{program}="path_id %p"
+# by-path (parent device path)
+KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p"
 KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"
+KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst"
 
 LABEL="persistent_storage_tape_end"
index 0299cdfd44fd8b4d423f14aedf51291c7d2214cd..5ae0c7fec90a8714d56fb925dad1d2378dd7bd4e 100644 (file)
@@ -45,7 +45,7 @@ KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_A
 KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
 KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
 
-# by-path (shortest physical path)
+# by-path (parent device path)
 ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p"
 ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
 ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"