chiark / gitweb /
cdrom_id: always set ID_CDROM regardless if we can run cdrom_id
[elogind.git] / rules / packages / 64-md-raid.rules
index def184f42c224ef04a7f5eb32398c3561e5fa265..6ba93b661ef988fe774b1bea6264dc050121274b 100644 (file)
@@ -8,6 +8,9 @@ ACTION!="add|change", GOTO="md_end"
 # import data from a raid set
 KERNEL!="md*", GOTO="md_end"
 
+# partitions have no md/{array_state,metadata_version}
+ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
+
 # container devices have a metadata version of e.g. 'external:ddf' and
 # never leave state 'inactive'
 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
@@ -24,8 +27,9 @@ ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env
 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
 ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
 
-IMPORT{program}="vol_id --export $tempnode"
+IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 OPTIONS+="link_priority=100"
+OPTIONS+="watch"
 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"