chiark / gitweb /
delete vol_id and require util-linux-ng's blkid
[elogind.git] / rules / rules.d / 60-persistent-storage.rules
index 825535c805b713e4ae95e31f5fd66c813e62544b..fea86d9310404a22c8e5887436383510b99cad35 100644 (file)
@@ -13,7 +13,7 @@ SUBSYSTEM!="block", GOTO="persistent_storage_end"
 KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end"
 
 # never access non-cdrom removable ide devices, the drivers are causing event loops on open()
-KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-gd", GOTO="persistent_storage_end"
+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", SUBSYSTEMS=="ide", ATTRS{media}=="disk|floppy", GOTO="persistent_storage_end"
 KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
 
 # ignore partitions that span the entire disk
@@ -55,10 +55,10 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
 
 # probe filesystem metadata of optical drives which have a media inserted
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
 
 # probe filesystem metadata of disks
-KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 
 # watch for future changes
 KERNEL!="sr*", OPTIONS+="watch"