* Proble using udev to rename ethernet interfaces
@ 2005-12-31 12:26 Thomas Koeller
2005-12-31 12:30 ` Thomas Koeller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Koeller @ 2005-12-31 12:26 UTC (permalink / raw)
To: linux-hotplug
Hi,
when trying to set up udev rules to assign names to my ethernet interfaces,
I ran into severe problems. There are two ethernet cards (of identical type)
in my computer, and I wrote the following rule to name the interfaces:
# Network interface setup
# Ethernet interfaces
SUBSYSTEM="net", KERNEL="eth[0-9]", SYSFS{address}="00:e0:29:48:fe:4d", NAME="eth_lan", RUN="start_lan"
SUBSYSTEM="net", KERNEL="eth[0-9]", SYSFS{address}="00:04:e2:08:dc:44", NAME="eth_dsl", RUN="/sbin/modprobe pppoe"
The results I get by using these rules are that sometimes the rules take effect,
and sometimes they don't. That is to say that if I cycle through loading/unloading
my ethernet driver modulemultiple times, the network interfaces may either be assigned
the names defined by the rules, or the kernel names 'eth0' and 'eth1', in an apparently
random fashion.
In particular, I observed the following cases:
1. First rule takes effect, second one does not
-----------------------------------------------
Dec 31 03:19:23 sarkovy udevd[248]: udev_done: seq 495, pid [1933] exit with 0, 0 seconds old
Dec 31 03:19:23 sarkovy udevd-event[1935]: udev_rules_get_name: rule applied, 'eth0' becomes 'eth_lan'
Dec 31 03:19:23 sarkovy udevd[248]: udev_event_run: seq 497 forked, pid [1937], 'add' 'net', 0 seconds old
Dec 31 03:19:23 sarkovy udevd-event[1937]: udev_rules_get_name: no node name set, will use kernel name 'eth1'
Dec 31 03:19:23 sarkovy udevd-event[1935]: udev_rules_get_name: reset run list
Dec 31 03:19:23 sarkovy udevd-event[1937]: udev_event_run: seq 497 finished
Dec 31 03:19:23 sarkovy udevd-event[1935]: rename_net_if: changing net interface name from 'eth0' to 'eth_lan'
Dec 31 03:19:23 sarkovy udevd[248]: udev_done: seq 497, pid [1937] exit with 0, 0 seconds old
Dec 31 03:19:23 sarkovy udevd-event[1935]: udev_add_device: renamed netif to 'eth_lan'
Dec 31 03:19:23 sarkovy udevd-event[1935]: run_program: 'start_lan' 'net'
Dec 31 03:19:23 sarkovy udevd-event[1935]: run_program: '/lib/udev/start_lan' returned with status 0
Dec 31 03:19:23 sarkovy udevd-event[1935]: udev_event_run: seq 496 finished
Dec 31 03:19:23 sarkovy udevd[248]: udev_done: seq 496, pid [1935] exit with 0, 0 seconds old
2. Both rules are ignored
-------------------------
Dec 31 03:20:18 sarkovy udevd[248]: udev_event_run: seq 523 forked, pid [2183], 'add' 'net', 0 seconds old
Dec 31 03:20:18 sarkovy udevd-event[2183]: udev_rules_get_name: no node name set, will use kernel name 'eth0'
Dec 31 03:20:18 sarkovy udevd-event[2183]: udev_event_run: seq 523 finished
Dec 31 03:20:18 sarkovy udevd[248]: udev_done: seq 523, pid [2183] exit with 0, 0 seconds old
Dec 31 03:20:18 sarkovy udevd[248]: udev_event_run: seq 524 forked, pid [2185], 'add' 'net', 0 seconds old
Dec 31 03:20:18 sarkovy udevd-event[2185]: udev_rules_get_name: no node name set, will use kernel name 'eth1'
Dec 31 03:20:18 sarkovy udevd-event[2185]: udev_event_run: seq 524 finished
Dec 31 03:20:18 sarkovy udevd[248]: udev_done: seq 524, pid [2185] exit with 0, 0 seconds old
Dec 31 03:20:21 sarkovy udevd[248]: udev_event_run: seq 525 forked, pid [2190], 'add' 'module', 0 seconds old
Dec 31 03:20:21 sarkovy udevd-event[2190]: udev_event_run: seq 525 finished
Dec 31 03:20:21 sarkovy udevd[248]: udev_done: seq 525, pid [2190] exit with 0, 0 seconds old
If, however, I execute 'udevstart' after loading the driver, both rules always take effect.
I am completely puzzled by this nondeterministic behavior, can anyone help?
Thomas
--
Thomas Koeller
thomas at koeller dot dyndns dot org
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
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] 4+ messages in thread* Re: Proble using udev to rename ethernet interfaces
2005-12-31 12:26 Proble using udev to rename ethernet interfaces Thomas Koeller
@ 2005-12-31 12:30 ` Thomas Koeller
2005-12-31 12:35 ` Kay Sievers
2005-12-31 12:36 ` Marco d'Itri
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Koeller @ 2005-12-31 12:30 UTC (permalink / raw)
To: linux-hotplug
I should have mentioned that I am using udev-079.
thomas
--
Thomas Koeller
thomas at koeller dot dyndns dot org
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
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] 4+ messages in thread
* Re: Proble using udev to rename ethernet interfaces
2005-12-31 12:26 Proble using udev to rename ethernet interfaces Thomas Koeller
2005-12-31 12:30 ` Thomas Koeller
@ 2005-12-31 12:35 ` Kay Sievers
2005-12-31 12:36 ` Marco d'Itri
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2005-12-31 12:35 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 31, 2005 at 01:26:28PM +0100, Thomas Koeller wrote:
> Hi,
>
> when trying to set up udev rules to assign names to my ethernet interfaces,
> I ran into severe problems. There are two ethernet cards (of identical type)
> in my computer, and I wrote the following rule to name the interfaces:
Try adding:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="address"
Your distro should include this until this patch hits the kernel:
http://www.kernel.org/git/?p=linux/kernel/git/gregkh/patches.git;a=blob;hb=HEAD;f=driver/net-swich-device-attribute-creation-to-default-attrs.patch
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
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] 4+ messages in thread
* Re: Proble using udev to rename ethernet interfaces
2005-12-31 12:26 Proble using udev to rename ethernet interfaces Thomas Koeller
2005-12-31 12:30 ` Thomas Koeller
2005-12-31 12:35 ` Kay Sievers
@ 2005-12-31 12:36 ` Marco d'Itri
2 siblings, 0 replies; 4+ messages in thread
From: Marco d'Itri @ 2005-12-31 12:36 UTC (permalink / raw)
To: linux-hotplug
On Dec 31, Thomas Koeller <thomas@koeller.dyndns.org> wrote:
> The results I get by using these rules are that sometimes the rules take effect,
> and sometimes they don't. That is to say that if I cycle through loading/unloading
Use this before the other rules:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="address"
--
ciao,
Marco
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2005-12-31 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31 12:26 Proble using udev to rename ethernet interfaces Thomas Koeller
2005-12-31 12:30 ` Thomas Koeller
2005-12-31 12:35 ` Kay Sievers
2005-12-31 12:36 ` Marco d'Itri
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).