From: Kay Sievers Date: Fri, 11 Jul 2008 07:53:33 +0000 (+0200) Subject: rules: tape rules - add nst to by-path/ links X-Git-Tag: 174~1661 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d8d24bcc668022857e1b4852ac37ce4400ddf8;p=systemd rules: tape rules - add nst to by-path/ links --- diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules index ce9e7bbb..d3226f13 100644 --- a/etc/udev/rules.d/60-persistent-storage-tape.rules +++ b/etc/udev/rules.d/60-persistent-storage-tape.rules @@ -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" diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules index 0299cdfd..5ae0c7fe 100644 --- a/etc/udev/rules.d/60-persistent-storage.rules +++ b/etc/udev/rules.d/60-persistent-storage.rules @@ -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"