From 4e129d88ab539a066e69f73eb7a83853d62f6ec9 Mon Sep 17 00:00:00 2001 From: Dimitar Zhekov Date: Sat, 18 Oct 2003 10:04:41 +0000 Subject: [PATCH] Dimitar Zhekov : I have to remind that the /etc/devfsd.d/hardware bug, a chown/chmod of the possibly unexisting /dev/.../generic, is still unfixed. After reviewing the proposed patches, I wrote a brand-new "hardware". The /dev/cdrom and /dev/dvd in it are symlinks to /dev/cdroms/cdrom0 which is itself a symlink, but are guaranteed [not] to exist and always point to the right location. Tested under -1041/ia32, including the 'generic' devices and rmmod . git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1602 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 1 + package/base/devfsd/devfsd_hardware.txt | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 6cd14cfe9..d62de00ea 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -4,6 +4,7 @@ - Alan Wylie: updated fetchmail - Mathieu Doidy: updated lftp (2.6.8) and added liferea - Dimitar Zhekov: bootdisk fixes + devfsd 'hardware' rewrite *) 2003-10-17 (2.0.0-rc2 - 2.0.0-rc3) diff --git a/package/base/devfsd/devfsd_hardware.txt b/package/base/devfsd/devfsd_hardware.txt index 72be14096..40df4b042 100644 --- a/package/base/devfsd/devfsd_hardware.txt +++ b/package/base/devfsd/devfsd_hardware.txt @@ -2,11 +2,10 @@ # cd-rom # user/group and persmission for the cd and the corespondig generic device -REGISTER ^((ide|scsi)/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+)/cd EXECUTE chown root.users /dev/\1/cd /dev/\1/generic -REGISTER ^((ide|scsi)/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+)/cd EXECUTE chmod 664 /dev/\1/cd /dev/\1/generic - -# create the historic /dev/cdrom device to always point to the first CD-ROM -REGISTER .*/.*/cd EXECUTE ln -s /dev/cdroms/cdrom0 /dev/cdrom -REGISTER .*/.*/cd EXECUTE ln -s /dev/cdroms/cdrom0 /dev/dvd +REGISTER ^(ide|scsi)/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+/(cd|generic) PERMISSIONS root.users 0644 +# handle the historic /dev/cdrom device always pointing to the first CD-ROM +REGISTER ^(cdroms/cdrom0)$ EXECUTE ln -s /dev/\1 /dev/cdrom +REGISTER ^(cdroms/cdrom0)$ EXECUTE ln -s /dev/\1 /dev/dvd +UNREGISTER ^cdroms/cdrom0$ EXECUTE rm -f /dev/cdrom /dev/dvd