chiark / gitweb /
cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media
[elogind.git] / rules / rules.d / 60-persistent-storage.rules
index e2a5e74b715e90aad792e452beb91da773d673c4..d9f8003cdea7a2c9cbe59cac6889af7e193d869b 100644 (file)
@@ -6,7 +6,7 @@
 # forward scsi device event to corresponding block device
 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
 
-ACTION!="add|change", GOTO="persistent_storage_end"
+ACTION=="remove", GOTO="persistent_storage_end"
 SUBSYSTEM!="block", GOTO="persistent_storage_end"
 
 # skip rules for inappropriate block devices
@@ -67,6 +67,7 @@ ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+
 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
 
 # by-id (World Wide Name)
-ENV{DEVTYPE}=="disk", ENV{ID_WWN}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN}"
+ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}"
+ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}-part%n"
 
 LABEL="persistent_storage_end"