DJ Lucas wrote:
> Jim Gifford wrote:
> 
>>DJ, in udev there is a program called cdsymlinks, that can do this
>>already. BLFS is going to need a udev section to add this in from the
>>udev-xxx/extras directory along with it's configuration file.
>>
> 
> 
> That's perfect!  Thanks!

Well, almost.  I'd think there needs to be an extra check
for the dvd device by default, IOW:  if there is both a dvd writer and a
cdwriter, then the cdrom link should go to the cdrw device in most
cases.  The reason being, why would you keep that old cdrw device around
if it didn't do something that the dvd doesn't..say like read subcodes
for CD+G which so far has been impossible on all recent drives with the
exception being Plextor CDRW drives.  :-)  I'll look at that when more
time is availible.

Anyway, thanks again for the pointer.  And just for the archives, but
watch the wraping, udev rules contain long lines...

tar -xf udev-0.54.tar.bz2
cd udev-0.54
mkdir /etc/udev/scripts
cp extras/cdsymlinks.sh /etc/udev/scripts
cp extras/cdsymlinks.conf /etc/udev
chmod 754 /etc/udev/scripts/cdsymlinks.sh
cat > /etc/udev/rules.d/20-cdsymlinks.rules << "EOF"
BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh
%k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"

BUS="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh
%k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"

BUS="scsi", KERNEL="scd[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh
%k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"

EOF

And don't forget to uncomment the variables and set them appropriatly in
/etc/udev/cdsymlinks.conf.

Optionally you can compile the cdsymlinks program and use that which
also uses the config file, but I'd prefer the flexibility of the script
(which I can probably edit later to give the cdrw the cdrom link if both
cdrw and dvdrw exist).

-- DJ Lucas
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to