summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-09-20 19:21:04 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2009-09-20 19:21:04 +0200
commit6e1a152d1cf3c3b8724f5ed37444ce714887b441 (patch)
tree2f9e7602a954d074c760413e6947686d5a455493 /rules
parentce096702ec01b12ca8af9b4c19f4bb5a83c787a1 (diff)
fix previous commit for CD detection
Do not run blkid twice. *brown paperbag*
Diffstat (limited to 'rules')
-rw-r--r--rules/rules.d/60-persistent-storage.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index 1b85156cc0..0950847b19 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -63,7 +63,7 @@ ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"