chiark / gitweb /
fix .gitignore
[elogind.git] / rules / rules.d / 60-persistent-storage.rules
index 5ae0c7fec90a8714d56fb925dad1d2378dd7bd4e..097e8640c465ec82974cdabfe7292ef71ce00548 100644 (file)
@@ -52,6 +52,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
 
 # skip unpartitioned removable media devices from drivers which do not send "change" events
 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
+# skip optical drives without media
+ENV{DEVTYPE}=="disk", KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end"
 
 # import filesystem metadata
 IMPORT{program}="vol_id --export $tempnode"