--- trunk/udev/udev-cdrom_id.rules.magellan 2008/12/22 18:56:05 715 +++ trunk/udev/udev-cdrom_id.rules.magellan 2011/05/26 22:42:57 1324 @@ -1,5 +1,5 @@ # /etc/udev/rules/60-cdrom_id.rules: device naming rules for udev -# $Header: /root/magellan-cvs/src/udev/udev-cdrom_id.rules.magellan,v 1.2 2008-12-22 18:56:00 niro Exp $ +# $Header: /root/magellan-cvs/src/udev/udev-cdrom_id.rules.magellan,v 1.5 2010-08-18 02:24:12 niro Exp $ # # There are a number of modifiers that are allowed to be used in some # of the different fields. They provide the following subsitutions: @@ -18,4 +18,15 @@ # file that can be run before this one. # -ACTION=="add|change", 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"