chiark / gitweb /
cdrom_id: remove unused --export switch to silent gcc
[elogind.git] / extras / cdrom_id / 60-cdrom_id.rules
index b06dafddb7ab8b72783177e56006ad2f8cef0fda..1ad1d0cc230cf39e43e132fcd30b71f3881a2dfa 100644 (file)
@@ -1,3 +1,14 @@
-# import optical drive properties
+# do not edit this file, it will be overwritten on update
 
-KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
+ACTION=="remove", GOTO="cdrom_end"
+SUBSYSTEM!="block", GOTO="cdrom_end"
+KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
+ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
+
+# this is only a button press event
+ENV{DISK_EJECT_REQUEST}=="?*", GOTO="cdrom_end"
+
+KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"
+IMPORT{program}="cdrom_id $tempnode"
+
+LABEL="cdrom_end"