From: juuso.alasuutari@tamperelainen.org Date: Sat, 24 Jun 2006 20:02:07 +0000 Subject: Re: swapping interface names (again) Message-Id: <1151179327.449d9a3fb27f1@cs1.alpha12.l-secure.net> List-Id: References: <449C9C3D.30601@bham.ac.uk> In-Reply-To: <449C9C3D.30601@bham.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I accidentally only sent my message to Marco. Here it is for the list also: Quoting Marco d'Itri : > On Jun 24, MS Colclough wrote: > > > imply that the whole process can be done by some udev rules that run > > at boot time? If so, how please? > Look at the Debian package for a simple script which generates rules on > demand. It's of course easy to write a script that creates something like z99-network.rules. But what should it contain? If I have eth0 and eth1, and want to swap their names, I first need to rename them to e.g. tempeth0 and tempeth1, and then to eth1 and eth0. But what kind of rule would recognise when all temporary names are created and apply the final ones? udevmonitor doesn't show any event where the interface is renamed. The last line is "add@/class/net/eth0", even though that interface was renamed tempeth0 by a rule. I tried to catch the renaming event with 'KERNEL="tempeth0", NAME="eth1"' and 'NAME="tempeth0", NAME="eth1"', but they didn't work. And even if they did, how could I be sure that the original eth1 wasn't still around messing things up? Both temp interface names would need to be set. Any ideas? Thanks, Juuso ---------------------------------------------------------------- This mail sent through L-secure: http://www.l-secure.net/ Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ 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