Commit d5686ac2 authored by Martin Pitt's avatar Martin Pitt
Browse files

Fix CD symlinks

Make /dev/cdrom appear for all types of drives, not just for pure CD-ROM ones.
Also, fix the symlinks to stay after change events.

LP: #1323777
parent 1dbbf598
......@@ -26,6 +26,9 @@ systemd (208-7) UNRELEASED; urgency=medium
Python 3. (LP: #1258089)
* Add simple autopkgtest for python3-systemd.
* Add dbus dependency to libpam-systemd. (Closes: #755968)
* Fix /dev/cdrom symlink to appear for all types of drives, not just for
pure CD-ROM ones. Also, fix the symlinks to stay after change events.
(LP: #1323777)
-- Michael Biebl <biebl@debian.org> Thu, 17 Jul 2014 00:48:14 +0200
......
......@@ -7,21 +7,19 @@ Add more aliases for CD/DVD devices.
rules/60-cdrom_id.rules | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules
index 6eaf76a..ac346fe 100644
--- a/rules/60-cdrom_id.rules
+++ b/rules/60-cdrom_id.rules
@@ -15,6 +15,14 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr
Index: systemd/rules/60-cdrom_id.rules
===================================================================
--- systemd.orig/rules/60-cdrom_id.rules
+++ systemd/rules/60-cdrom_id.rules
@@ -15,6 +15,12 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdr
# enable the receiving of media eject button events
IMPORT{program}="cdrom_id --lock-media $devnode"
-KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+ACTION!="add", GOTO="cdrom_end"
+
+# 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_CD}=="?*", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment