udev won't rename eth1 in fc6

sean seandarcy2 at gmail.com
Sun May 13 17:40:28 UTC 2007


Mikkel L. Ellertson wrote:
> sean wrote:
>> I'm trying to persistently name a net card in fc6.
>>
>> udev-095-17.fc6
>>
>> cat 10-network-interface.rules
>> KERNEL=="eth*", SYSFS{address}=="00:a0:24:54:28:cb", NAME="lan"
>>
>> before modprobe:
>>
>> ls /sys/class/net
>> eth0 lo ppp0 sit0
>>
>> then I modprobe 3c59x, udevmonitor shows:
>>
>> UEVENT[1178971722.841091] add@/module/3c59x
>> UEVENT[1178971722.849159] add@/bus/pci/drivers/3c59x
>> UEVENT[1178971722.884779] add@/class/net/eth1
>> UDEV [1178971723.163556] add@/class/net/lan
>>
>> BUT,
>>
>> ls /sys/class/net
>> eth0 eth1 lo ppp0 sit0
>>
>> so /class/net/lan is NOT created.
>>
>> And why is eth1 created? I though the idea of NAME was that it named the
>> true device node. SYMLINK was used when you wanted an extra name.
>>
>> Thanks for any help.
>>
>> sean
>>
> I don't have time to look into it right now, but I suspect that the
> 60-net.rules may be giving you problems. You can check this by
> adding the last_rule option to your rules.
> 
> Mikkel

Tried:
KERNEL=="eth*", SYSFS{address}=="00:a0:24:54:28:cb", 
NAME="lan", OPTIONS="last_rule"

udevmonitor after modprobe 3c59x gave:

UEVENT[1179076823.191741] add@/module/3c59x
UEVENT[1179076823.199782] add@/bus/pci/drivers/3c59x
UEVENT[1179076823.236176] add@/class/net/eth1

Note that w/out last_rule udev thinks it's creating 
/class/net lan.  So this looks bad, but it actually does 
create /class/net/lan!!

ls
eth0  lan  lo  ppp0  sit0


which worked! That is setting up ifcfg-lan caused ifup lan 
to work and show up in ifconfig as "lan" interface.

udevmonitor showed on rmmod:

UEVENT[1179077431.405204] remove@/class/net/lan
UEVENT[1179077431.413955] remove@/bus/pci/drivers/3c59x
UEVENT[1179077431.421534] remove@/module/3c59x
UDEV  [1179077431.442336] remove@/class/net/lan

But what I really wanted to do was create a symlink, so I tried:

KERNEL=="eth*", SYSFS{address}=="00:a0:24:54:28:cb", 
SYMLINK+="lan", OPTIONS="last_rule"

This failed. Only eth1 was created.

Also tried
KERNEL=="eth*", SYSFS{address}=="00:a0:24:54:28:cb", 
NAME=eth1, SYMLINK+="lan", OPTIONS="last_rule"

which didn't help.

So progress. Any further suggestions?

sean




More information about the fedora-list mailing list