Michael Tinsay <[EMAIL PROTECTED]> writes:
>From what I have read, udev cannot override kernel-assigned names, like
>event[0-9] -- I tried with no luck.  Udev can only give them additional
>names or symlinks, but the original kernel name is preserved.

Err... no. udev does everything, including the kernel-assigned names. On
my Gutsy installation, I have in /etc/udev/rules.d/20-names.rules:

->8------

# Input devices, group under /dev/input
KERNEL=="event[0-9]*",                  NAME="input/%k"
KERNEL=="mice",                         NAME="input/%k"
KERNEL=="mouse[0-9]*",                  NAME="input/%k"
KERNEL=="js[0-9]*",                     NAME="input/%k"
KERNEL=="ts[0-9]*",                     NAME="input/%k"
KERNEL=="uinput",                       NAME="input/%k"

->8------

which, from the link I gave you, can be modified as such:

->8------

KERNEL=="event[0-9]*", 
ATTRS{modalias}=="input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw",
    NAME="input/event1"
KERNEL=="event[0-9]*", 
ATTRS{modalias}=="input:b0003v046DpC016e0110-e0,1,2,k110,111,112,r0,1,8,amlsfw",
  NAME="input/event2"

->8------

Of course, that might squash the other event nodes; you can then rewrite
it to call a script that does the assignment with PROGRAM

->8------

KERNEL=="event[0-9]*", PROGRAM="/sbin/assign-input-events.sh"

->8------

In this case, /sbin/assign-input-events.sh must be executable by udevd
(i.e. root), and must output to stdout the device node to create under
dev (i.e. the value that would normally go in NAME in the udev rules)


So, no. Everything is quite flexible under udev; there is no
"hard-coding" of naming policy, unlike under devfs and a static /dev.

-- 
JM Ibanez
Software Architect
Orange & Bronze Software Labs, Ltd. Co.

[EMAIL PROTECTED]
http://software.orangeandbronze.com/
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to