* can't rename eth1, but udevmonitor says it is
@ 2007-05-12 12:16 sean darcy
2007-05-13 17:55 ` sean darcy
2007-05-13 18:04 ` Andrey Borzenkov
0 siblings, 2 replies; 3+ messages in thread
From: sean darcy @ 2007-05-12 12:16 UTC (permalink / raw)
To: linux-hotplug
Using udev-095-17.fc6 on fc6, I'm trying to rename eth1, one of two
ethernet cards:
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.
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
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can't rename eth1, but udevmonitor says it is
2007-05-12 12:16 can't rename eth1, but udevmonitor says it is sean darcy
@ 2007-05-13 17:55 ` sean darcy
2007-05-13 18:04 ` Andrey Borzenkov
1 sibling, 0 replies; 3+ messages in thread
From: sean darcy @ 2007-05-13 17:55 UTC (permalink / raw)
To: linux-hotplug
After looking around I tried last_rule, in case fedora was messing around:
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.
Any suggestions?
sean
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can't rename eth1, but udevmonitor says it is
2007-05-12 12:16 can't rename eth1, but udevmonitor says it is sean darcy
2007-05-13 17:55 ` sean darcy
@ 2007-05-13 18:04 ` Andrey Borzenkov
1 sibling, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2007-05-13 18:04 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 2247 bytes --]
On Sunday 13 May 2007, sean darcy wrote:
> 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.
>
you can't create symlink to interface. You can only rename it (NAME="lan"). If
this does not work there is some bug somewhere; it works here (udev 110):
SUBSYSTEM=="net", ACTION=="add", ENV{INTERFACE}!="*.*",
SYSFS{address}=="00:00:39:d7:14:a1", NAME="lan", ENV{MDV_CONFIGURED}="yes"
{pts/0}% sudo udevmonitor
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent
UEVENT[1179079411.685653] add /module/e100 (module)
UEVENT[1179079411.716449] add /bus/pci/drivers/e100 (drivers)
UDEV [1179079411.719899] add /module/e100 (module)
UDEV [1179079411.723261] add /bus/pci/drivers/e100 (drivers)
UEVENT[1179079411.725199] add /devices/pci0000:00/0000:00:0a.0/eth0 (net)
UDEV [1179079412.235478] add /devices/pci0000:00/0000:00:0a.0/lan (net)
{pts/1}% LC_ALL=C ll /sys/class/net
total 0
lrwxrwxrwx 1 root root 0 May 13 22:00
eth1 -> ../../devices/pci0000:00/0000:00:10.0/0.0/eth1/
lrwxrwxrwx 1 root root 0 May 13 22:00
irda0 -> ../../devices/virtual/net/irda0/
lrwxrwxrwx 1 root root 0 May 13 22:03
lan -> ../../devices/pci0000:00/0000:00:0a.0/lan/
lrwxrwxrwx 1 root root 0 May 13 22:00 lo -> ../../devices/virtual/net/lo/
> Also tried
> KERNEL=="eth*", SYSFS{address}=="00:a0:24:54:28:cb", NAME=eth1,
> SYMLINK+="lan", OPTIONS="last_rule"
>
> which didn't help.
>
> Any suggestions?
>
> sean
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-13 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-12 12:16 can't rename eth1, but udevmonitor says it is sean darcy
2007-05-13 17:55 ` sean darcy
2007-05-13 18:04 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).