[systemd-devel] When and why was write_cd_rules and 75-cd-aliases-generator.rules where dropped?

Robert Milasan rmilasan at suse.com
Thu Feb 7 04:46:27 PST 2013


Hi,
 just notice that in newer version of systemd-udev (195) write_cd_rules
 and 75-cd-aliases-generator.rules have been dropped. Can anybody give
 me the commit for that (tried to find it, but didn't)?

Also shouldn't we add a
default /dev/dvd, /dev/cdrom, /dev/cdrw, /dev/dvdrw for the primary
cd/dvd drive?

I'm asking this because apps like VLC are trying always to
read /dev/dvd to play DVD and in some cases some users don't know
that /dev/sr0 or /dev/cdrom is that same thing.

I think this small patch should do the trick:

diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules
index 6eaf76a..ec0b19a 100644
--- a/rules/60-cdrom_id.rules
+++ b/rules/60-cdrom_id.rules
@@ -15,6 +15,9 @@ 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"
+KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom",
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_RW}=="1", SYMLINK+="dvdrw",
OPTIONS+="link_priority=-100" LABEL="cdrom_end"

The above patch has been tested and is working.

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A


More information about the systemd-devel mailing list