From: Marco d'Itri <md@linux.it>
Date: Sat, 26 Apr 2014 19:30:41 +0200
Subject: more cd aliases

Add more aliases for CD/DVD devices.
---
 rules/60-cdrom_id.rules | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules
index 6eaf76a..4dccfc6 100644
--- a/rules/60-cdrom_id.rules
+++ b/rules/60-cdrom_id.rules
@@ -15,6 +15,12 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr
 # enable the receiving of media eject button events
 IMPORT{program}="cdrom_id --lock-media $devnode"
 
-KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+# These rules will create symlinks for the CD/DVD reader, to help old
+# programs which are unable to automatically discover the devices.
+# The results are undefined for system with multiple CD/DVD devices.
+ENV{ID_CDROM}=="?*",        SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+ENV{ID_CDROM_CD_RW}=="?*",  SYMLINK+="cdrw",  OPTIONS+="link_priority=-100"
+ENV{ID_CDROM_DVD}=="?*",    SYMLINK+="dvd",   OPTIONS+="link_priority=-100"
+ENV{ID_CDROM_DVD_RW}=="?*", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100"
 
 LABEL="cdrom_end"
