From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexander E. Patrakov" Date: Sat, 09 Sep 2006 04:47:59 +0000 Subject: A wish for network rules Message-Id: <4502477F.10109@ums.usu.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hello, Now udev distribution includes the scripts that generate persistent numbered symlinks for network devices and rules for keeping the ethernet device order between reboots. There is, however, one problem with the script. Suppose that I have a computer with two network cards at home. One of them faces a wired network spanning several homes, with the wire going from one roof to the other. In summer, this network card is likely to be damaged by lightning, together with the switch (yes, there are devices that protect against this, but bad things happen even with them). I want to be able to replace this network card easily. With the current generator, which generates persistent rules based on MAC addresses, the following steps are needed: * Power off the computer * Remove the damaged network card (let's suppose it was "eth0"), put another cheap RTL-8139 clone instead of it * Turn the computer on. It will detect the new card and assign a name such as "eth2" to it * Edit the generated rules and replace "eth2" with "eth0". Remove the original rule about "eth0" * Reboot again However, in this use case, location-based rules such as the following one (sorry, it is for old version of udev) are preferred to MAC-based ones: SUBSYSTEM="net", BUS="pci", ID="0000:00:0c.0", NAME="eth0" This way, one just has to: * Power the computer off * Remove the damaged network card (let's suppose it was "eth0"), insert a new one in the same PCI slot * Turn the computer on again. No reconfiguration is needed, because the new card becomes "eth0". I want the network rule generator to become configurable via a file in /etc/default or in /etc/udev and allow to choose the style of network rules among the two described ones. Similarly, one may wish (for unknown-yet reason) to have identity-based (i.e., model + serial number) rules for numbered CD-ROM symlinks. -- Alexander E. Patrakov ------------------------------------------------------------------------- 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