[nSLUG] Re: DVD drive with no CD audio (and now udev)

Mike Spencer mspencer at tallships.ca
Fri Feb 6 00:45:10 AST 2009


me> The new LG drive *does* have the same 4-pin analog audio output
me> connector on the back....as "useless as tits on a boar pig."

DM> ...LG put the analog audio connector on the drive, but it does not
DM> do anything??  AUggh!!!  That's just not fair.

That's what I thought.  Well, actually, I thought, "Shpx!".

me> Add "ln -s" lines to rc.local? [to remove/recreate /dev symlinks]

DM> Sounds like a nasty kludge, but I bet it would work!

Yeah, since I did it by hand with Emacs dired and it worked until
reboot, it should work from a startup script.  Sort of like letting
Pointy-Haired Boss set up the equipment each day and then going in and
re{cabling,bolting,assembling} it all while he's drinking coffee.

Rich> You need to create local rules file in /etc/udev/rules.d
Rich> 
Rich> Example of my setup
Rich> 
Rich> File:   10-local.rules
Rich> 
Rich> SUBSYSTEMS=="scsi",KERNEL=="sd?1",ATTRS{model}=="USB CF Reader   \
Rich> ",SYMLINK+="cardCF"
Rich> [snip]

Great! So now we're back to where we were with early /dev. Figure out
what devices you have, find out what the system calls them or what
they call themselves and them create specs for the dev.  Only now we
have to learn a new language (udev rules) to do it.

Rich> There are some really good udev tutorials.

Ah!  There seems to be *one*. [1] Ver. 0.74 is current.  Between your
examples, Rich, (thank you) and that tutorial (which, I now see, came
with my Slack distro), I'm pretty clear (not *completely* clear
without some experiments) on how to fix it up.  The tutorial gives
nearly what I want as an example:

tut>  SUBSYSTEM=="block", KERNEL=="hdc", SYMLINK+="dvd", GROUP="cdrom"

except that will leave udev to also assign "cdrom" as a symlink to hdc
(as it does now) so I think I have to use:
                                              +-- ':', not '+'
                                              v
    SUBSYSTEM=="block", KERNEL=="hdc", SYMLINK:="dvd", GROUP="cdrom"

so as to prevent the later assignment of "cdrom" to hdc, too.   I want
to assign  "cdrom" as a symlink to the other optical drive, sr0.

Then, of course, I'll have to change it again when I figure out what
happens when I remove append="hdd=ide-scsi" from lilo.conf because
then sr0 will be hdd.  Ho hum.


Tnx,
- Mike


[1] http://www.reactivated.net/writing_udev_rules.html 

-- 
Michael Spencer                  Nova Scotia, Canada       .~. 
                                                           /V\ 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^



More information about the nSLUG mailing list