chiark / gitweb /
cdrom_id: add rules file to call cdrom_id
authorKay Sievers <kay.sievers@suse.de>
Tue, 5 Sep 2006 01:43:14 +0000 (03:43 +0200)
committerKay Sievers <kay.sievers@suse.de>
Tue, 5 Sep 2006 01:43:14 +0000 (03:43 +0200)
extras/cdrom_id/60-cdrom_id.rules [new file with mode: 0644]
extras/cdrom_id/Makefile

diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules
new file mode 100644 (file)
index 0000000..b06dafd
--- /dev/null
@@ -0,0 +1,3 @@
+# import optical drive properties
+
+KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
index f5890a0..d5138c5 100644 (file)
@@ -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: