From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Schwarzott Date: Thu, 18 Jan 2007 10:31:55 +0000 Subject: Race condition for udev/persistent-net Message-Id: <200701181131.55452.zzam@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi there! I am trying to find out why the persistent-net-rules only work sometimes fo= r=20 me (using udev-103-r3 on gentoo). Steps to reproduce: (All files I use are relative to /etc/udev/rules.d) 1. Make sure 70-persistent-net.rules exists. If not try reloading network modules and running udevtrigger. 2. Modify NAME-Part of rules to something not used as default (either=20 non "eth", or higher numbers like eth7 ...) 3. udevcontol reload_rules After these steps one can try wheather the existing rules now get applied=20 every time or not by: 4. rmmod and modprobe network module. 5. Verify name by "ifconfig -a|grep Ethernet" 6. If name is wrong executing udevtrigger and recheck. For me the name was correct in 3 out of 15 tries. The generated rules look like this for me (after changing NAME): # PCI device 0x8086:0x1076 (e1000) SUBSYSTEM=3D"net", DRIVERS=3D"?*", ATTRS{address}=3D"xx:xx:xx:xx:xx:xx",=20 NAME=3D"eth8" It seems that DRIVERS is not always set when trying this rule. Removing it,= or=20 adding next rule to 05-udev-early.rules helped: ACTION=3D"add", SUBSYSTEM=3D"net", WAIT_FOR_SYSFS=3D"device/driver" But the problem with this rule is: udev now waits also for a driver entry f= or=20 loopback/bridge devices. This gives ugly log/console output. Is there a better place to put such a wait-rule? It is also possible to just skip the DRIVERS=3D"?*" part from the generated= =20 rules and only keep it in the generator (with the wait inside the generatin= g=20 part) to set a reasonable comment. Greetings Matthias Schwarzott --=20 Matthias Schwarzott (zzam) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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