udev won't rename eth1 in fc6
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Sun May 13 18:45:11 UTC 2007
sean wrote:
>
> 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
>
If you want to create a symlink, instead of a name, then you need to
change the name of your rule file so it is processed after
60-net.rules, instead of before. I am not sure that it will work, as
I have not used udev to create symlinks to network devices, but your
rules will have to be processed after the rules that create the
network device in order to have a chance at working.
It might be better to tell us why you want to create a symlink to a
network device, as there may be a better way to do what you want,
and reasons why udev will not do what you are after.
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
More information about the fedora-list
mailing list