1 |
Richard, |
2 |
|
3 |
You said that one rule can override other, but if you read udev |
4 |
manual ( http://www.reactivated.net/writing_udev_rules.html ), you'll |
5 |
realize that what you said I think is incorrect. |
6 |
|
7 |
"Files in /etc/udev/rules.d/ are parsed in lexical order. udev will |
8 |
stop processing rules as soon as it finds a matching rule in a file |
9 |
for the new item of hardware that has been detected. It is important |
10 |
that your own rules get processed before the udev defaults, otherwise |
11 |
your own naming schemes will not take effect! I suggest that you keep |
12 |
your own rules in a file at /etc/udev/rules.d/10-local.rules (this |
13 |
doesn't exist by default - create it). As 10 comes before 50, you know |
14 |
that your rules will be looked at first. It is important that the |
15 |
filenames of your rule files end with the .rules suffix, otherwise |
16 |
they will not be used." |
17 |
|
18 |
Let me know if I am wrong too? :-) |
19 |
|
20 |
Leandro. |
21 |
|
22 |
2006/5/30, Richard Fish <bigfish@××××××××××.org>: |
23 |
> On 5/29/06, Leandro Melo de Sales <leandroal@×××××.com> wrote: |
24 |
> > BUS=="scsi", SYSFS{model}=="SAMSUNG SP123245", NAME="/dev/sda" |
25 |
> > BUS=="scsi", SYSFS{model}=="SysOp ", NAME="/dev/sdb" |
26 |
> > BUS=="scsi", SYSFS{model}=="Dados ", NAME="/dev/sdc" |
27 |
> |
28 |
> 1. You probably need the ":=" syntax to prevent later rules from |
29 |
> over-riding your settings. For example, in 50-udev.rules, I see: |
30 |
> 50-udev.rules:KERNEL=="sd*", NAME="%k", GROUP="disk" |
31 |
> |
32 |
> 2. You should not have the "/dev/" part of NAME. |
33 |
> |
34 |
> 3. You probably also need to handle the partitions with the %n syntax |
35 |
> |
36 |
> So those rules should be more like: |
37 |
> |
38 |
> BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="SAMSUNG SP123245", NAME:="sda%n" |
39 |
> BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="SysOp ", NAME:="sdb%n" |
40 |
> BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="Dados ", NAME:="sdc%n" |
41 |
> |
42 |
> You might also consider using LVM on these disks, so you need not care |
43 |
> about sdX, or mounting them by fileystem label. |
44 |
> |
45 |
> -Richard |
46 |
> -- |
47 |
> gentoo-user@g.o mailing list |
48 |
> |
49 |
> |
50 |
|
51 |
|
52 |
-- |
53 |
Leandro Melo de Sales. |
54 |
Computer Science Student |
55 |
Laboratório de Sistemas Distribuídos - www.lsd.ufcg.edu.br |
56 |
Laboratório de Sistemas Embarcados e Computação Pervasiva - |
57 |
www.embeddedacademy.org |
58 |
Universidade Federal de Campina Grande - UFCG |
59 |
Campina Grande - PB - Brasil |
60 |
|
61 |
-- |
62 |
gentoo-user@g.o mailing list |