summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extras/cdrom_id/60-cdrom_id.rules3
-rw-r--r--extras/cdrom_id/Makefile4
2 files changed, 6 insertions, 1 deletions
diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules
new file mode 100644
index 0000000000..b06dafddb7
--- /dev/null
+++ b/extras/cdrom_id/60-cdrom_id.rules
@@ -0,0 +1,3 @@
+# import optical drive properties
+
+KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
diff --git a/extras/cdrom_id/Makefile b/extras/cdrom_id/Makefile
index f5890a0c6a..d5138c5933 100644
--- a/extras/cdrom_id/Makefile
+++ b/extras/cdrom_id/Makefile
@@ -18,7 +18,7 @@ usrbindir = ${prefix}/usr/bin
usrsbindir = ${prefix}/usr/sbin
libudevdir = ${prefix}/lib/udev
mandir = ${prefix}/usr/share/man
-configdir = ${etcdir}/udev/
+configdir = ${etcdir}/udev
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
@@ -50,10 +50,12 @@ clean:
install-bin: all
$(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG)
+ $(INSTALL_DATA) -D 60-cdrom_id.rules $(DESTDIR)$(configdir)/rules.d/60-cdrom_id.rules
.PHONY: install-bin
uninstall-bin:
- rm $(DESTDIR)$(libudevdir)/$(PROG)
+ - rm $(DESTDIR)$(configdir)/rules.d/60-cdrom_id.rules
.PHONY: uninstall-bin
install-man: