[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: devfs.rules vs. udev.rules



Colin <cwvca_blah@hotmail.com> writes:

> There really should be a configuration directory like crontab or
> /etc/modprobe.d for udev where you can create custom rules and won't
> have to worry about new versions of configuration files overwritting
> them.

There is for udev 024 and up (actually, I'm not sure which version got
this functionality).  If udev_rules variable points to a directory, then
all the files in that directory with the .rules extension will be used
as the new rules.

Note that there is a "bug" in this functionality in the latest udev (024).
Say you have different rules for the same node, either in different
files or on different lines.

example:
BUS="ide", ID="1.0", SYMLINK="dvd"
BUS="ide", ID="1.0", SYMLINK="cdrw"
BUS="ide", ID="1.0", NAME="cdrom"

This will work, in that udev will create a node cdrom with symlinks dvd
and cdrw.

But if the NAME rule had come first, then the symlinks wouldn't be
created.  Basically, the naming function stops at the first NAME rule.
Something to make a note of.  Probably be fixed in one of the upcoming
version, since they are aware of it on the udev dev. list.

-- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes



Reply to: