<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Am 25.06.2012 14:58, schrieb Dr. Thomas Bastian:<br>
<span style="white-space: pre;">> Am Samstag, den 23.06.2012,
14:41 +0200 schrieb Kay Sievers:<br>
>> On Sat, Jun 23, 2012 at 2:17 PM, Dr. Thomas Bastian
<a class="moz-txt-link-rfc2396E" href="mailto:tbastian@gmx.net"><tbastian@gmx.net></a> wrote:<br>
>>>> Udev cannot rename kernel-created device nodes.
These nodes are not<br>
>>>> created by udev, but by the kernel itself. Udev
will not change them,<br>
>>>> just set permissions and ownership.<br>
>>>><br>
>>>> Udev can add additional symlinks pointing to the
kernel-created nodes.<br>
>>>> Just use SYMLINK+= instead of NAME=, like here:<br>
>>>>
<a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/systemd/systemd/tree/rules/60-persistent-v4l.rules">http://cgit.freedesktop.org/systemd/systemd/tree/rules/60-persistent-v4l.rules</a><br>
>>><br>
>>> thanks for your prompt reply. I understand your
suggestion. But this<br>
>>> does not help me to bring 4 dvb-cards<br>
>>> (/dev/dvb/adapter0.../dev/dvb/adapter3) into the
order needed for<br>
>>> adressing the proper hardware by different apps,
because the necessary<br>
>>> symlinks have the same names as the kernel-given
nodes (just another<br>
>>> order).<br>
>>><br>
>>> Are there other possibilities to make the kernel
establish the nodenames<br>
>>> based on hardware attributes rather then in the order
of plugging the<br>
>>> hardware into the computer?<br>
>><br>
>> Not really. Kernel names are not predictable in that
manner. They are<br>
>> simply unique numbers, no stability is guaranteed
regarding<br>
>> parallelism or discovery order.<br>
>><br>
>> The tools which relay on a specific name should use the
symlinks<br>
>> directly instead of looking at the plain kernel names.<br>
>><br>
>> Or they should be made aware to cope with different names
at every<br>
>> bootup, and select the devices on properties they find at
the device,<br>
>> instead of expecting the kernel's enumeration number to
be stable.<br>
><br>
> Thanks for the information. I think, I gonna create a small
shell script<br>
> that performs your suggested "name resolution".</span><br>
<br>
I assume your apps require names like /dev/dvb/adapterN?<br>
<br>
I once encountered a similar problem with netwok cards (kernel: eth0
eth1, config: eth8 eth9) where eth0 and eth1 were random, but eth8
and eth9 fixed to the card.<br>
<br>
eth8 and eth9 were used by the networking setup and were symlinks
created by udev rules based on the mac addr of eth0 and eth1. The
rules in a file in /etc/udev/rules.d were like this:<br>
<br>
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="5c:ff:35:00:7b:d1", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth8"<br>
<br>
Maybe you can use udev rules to setup /dev/dvb/adapter[6-9] based
e.g on bus id or something similar, use these in your applications
and ignore adapter[0-3]?<br>
<br>
HTH<br>
<br>
<br>
</body>
</html>