chiark / gitweb /
rules: run vol_id only for partitions
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 11 Aug 2007 12:01:54 +0000 (14:01 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 11 Aug 2007 12:01:54 +0000 (14:01 +0200)
Until we add support to the kernel to report media changes with a
"change" event, do not read the device content, because it will not
get updated when the media is removed or replaced.

etc/udev/rules.d/60-persistent-storage.rules

index a49321c..62cdad6 100644 (file)
@@ -59,7 +59,7 @@ KERNEL=="sr*|st*", GOTO="persistent_storage_end"
 KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
 
 # by-label/by-uuid (filesystem properties)
-IMPORT{program}="vol_id --export $tempnode"
+ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode"
 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}"