slackware-current/source/a/udev/60-cdrom_id.rules.diff

29 lines
1.9 KiB
Diff
Raw Normal View History

--- ./src/cdrom_id/60-cdrom_id.rules.orig 2012-01-30 12:02:56.526251552 -0600
+++ ./src/cdrom_id/60-cdrom_id.rules 2013-01-17 21:11:20.821006629 -0600
@@ -15,6 +15,24 @@
# enable the receiving of media eject button events
IMPORT{program}="cdrom_id --lock-media $devnode"
-KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+# create default links to the first detected device
+KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_CD_R}=="1", SYMLINK+="cdr", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_CD_R}=="1", SYMLINK+="cdwriter", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_DVD_R}=="1", SYMLINK+="dvdr", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_DVD_R}=="1", SYMLINK+="dvdwriter", OPTIONS+="link_priority=-100"
+KERNEL=="sr0", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100"
+
+# create all other device links
+KERNEL=="sr[0-9]*", ENV{ID_CDROM}=="1", SYMLINK+="cdrom%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_CD_R}=="1", SYMLINK+="cdr%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_CD_R}=="1", SYMLINK+="cdwriter%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_DVD_R}=="1", SYMLINK+="dvdr%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_DVD_R}=="1", SYMLINK+="dvdwriter%n", OPTIONS+="link_priority=-100"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw%n", OPTIONS+="link_priority=-100"
LABEL="cdrom_end"