On Sun, 03 Jul 2011 03:18:05 +0000, T o n g wrote:

> On Sat, 02 Jul 2011 16:06:23 +0000, Camaleón wrote:
> 
>> just read Debian udev the docs to follow the instructions.
> 
> Hi Camaleón,
> 
> Thanks for your reply. However, I was having a hard time trying to find
> what you meant by "Debian udev the docs". 

There was an error on my phrase. I should have written "just read Debian 
udev docs".

> All that I found are bit and pieces here and there. Would you be so
> kind to give me a list to read please?

I don't think Debian wiki is updated enough but this can also be of help:

http://wiki.debian.org/udev

And of course, "udev" package docs:

/usr/share/doc/udev/*

>> I would try:

(...)

>> That is:
>> 
>> - From the DVD entries, disable (#) all but the one that makes "dvd"
>> node.
>> - From the CD-R entries, disable (#) all and add a new one that makes
>> "cdrom" node.
> 
> That looks substantially different from the examples given from
> http://reactivated.net/writing_udev_rules.html

> #example-cdrom:
> 
>  SUBSYSTEM=="block", KERNEL=="hdc", SYMLINK+="dvd", GROUP="cdrom"
>  SUBSYSTEM=="block", KERNEL=="hdd", SYMLINK+="dvdrw", GROUP="cdrom"
> 
> I guess the above example is already obsolete, or it is still OK?

More than obsolete, I think udev provides many ways for doing the same 
thing. Also, if you carefully look at the "/etc/udev/rules.d/70-
persistent-cd.rules" file, it says that all the entries have to finish 
with "ENV{GENERATED}=1" flag, and this can be a requirement only for 
Debian.

>>> Where should I put those rules? I believe that /etc/udev/rules.d/70-
>>> persistent-cd.rules is automatically generated by the 75-cd-aliases-
>>> generator.rules. I hope that I can put those rules in a standalone
>>> file which can overwrite settings in
>>> /etc/udev/rules.d/70-persistent-cd.rules.
>> 
>> You can edit the same file. If after that it works as you want, you can
>> then put them in another file,
> 
> Ok, so say after it works as I want, 

You need first to catch the bear before sell his skin :-) 

> I put them in another file, /etc/udev/rules.d/71-my-cd.rules,
> but how would I overwrite the settings in /etc/udev/rules.d/70
> -persistent- cd.rules, which was automatically generated by the 75-cd
> -aliases- generator.rules? I.e., wouldn't those line that I disabled (by
> #) would come up again once the /etc/udev/rules.d/70-persistent
> -cd.rules is regenerated?

Good question. Let's see what "man udev" has to say:

***
Rules files

The udev rules are read from the files located in the default rules
directory /lib/udev/rules.d/, the custom rules directory /etc/udev/
rules.d/ and the temporary rules directory /dev/.udev/rules.d/. All rule 
files are sorted and processed in lexical order, regardless in which of 
these directories they live. Every line in the rules file contains at 
least one key value pair. There are two kind of keys, match and 
assignment keys. If all match keys are matching against its value, the 
rule gets applied and the assign keys get the specified value assigned.

(...)
***

So here we have a problem. What will prevail...? 

1/ A matching rule read at first place (e.g., 69-my-cd.rules) → once a 
rule hits a match, the rest are ignored

2/ A matching rule read at last (e.g., 71-my-cd.rules) → last match wins

3/ None of the above → there can't be "confronting" rules

Unless someone knows the answer (I don't) you will have to test ;-)

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.07.03.15.51...@gmail.com

Reply via email to