From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Schwarzott Date: Wed, 14 Nov 2007 09:54:38 +0000 Subject: Re: Fwd: udev suggestion (persistent-net) Message-Id: <200711141054.38671.zzam@gentoo.org> List-Id: References: <200711131722.18917.zzam@gentoo.org> In-Reply-To: <200711131722.18917.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mittwoch, 14. November 2007, Vaeth wrote: > On Tue, 13 Nov 2007, Bryan Kadzban wrote: > > Let me simplify this example. Start with just T1 (no IEEE interface, no > > second tulip-using interface, just one tulip-using interface). It will > > get eth0 when the machine boots, and the rule that you want to generate > > will be: > > > > DRIVER="tulip", NAME="eth0" > > > > Now, the user shuts the machine down and adds a second NIC that also > > uses the tulip driver. > > This is correct: At the *first* boot with an *added* card, that card > which was not (completely) specified might change its name. > This is intentional: Only in this way the newly added card has a chance > to replace the old one (as you write: There is no way to tell whether > a card was replaced or just a new card was added, because you never > know when the kernel has "found" all hardware). > However, at *further* boots the order will remain. > This should not be confusing from the user's perspective if he looks > at net-persistent.rules: He sees that one tulip card should be eth0, > and this is the case. Of course, if the user dislikes the behaviour, > he can still choose to specify the MAC of the card, i.e. he can still > have the current behaviour. The difference is that he is not forced to > do so (i.e. the rule DRIVER="tulip", NAME="eth0" will not prevent > the user from adding a further tulip card without manual interaction). > Well, the user is not forced to do anything. But with present rules he also can change the generated rules to match DRIVER or whatever criteria he wants. You can also keep the rules and write a script to be called when a card has been changed. Once the system is installed finally you can add this rule to call your script: SUBSYSTEM="net", NAME="", IMPORT{program}="hw got exchanged" this script could then sleep for some time (like 10s) to be sure all other existant net-cards got drivers loaded - and then check which assigned card misses and create a rule replacing this card. This is all possible - but I will not vote for adding this rules into default udev ruleset. Matthias -- Matthias Schwarzott (zzam) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ 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