From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Fwd: udev suggestion (persistent-net)
Date: Wed, 14 Nov 2007 09:54:38 +0000 [thread overview]
Message-ID: <200711141054.38671.zzam@gentoo.org> (raw)
In-Reply-To: <200711131722.18917.zzam@gentoo.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
prev parent reply other threads:[~2007-11-14 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 16:22 Fwd: udev suggestion (persistent-net) Matthias Schwarzott
2007-11-13 16:36 ` Marco d'Itri
2007-11-13 20:29 ` Vaeth
2007-11-13 23:23 ` Bryan Kadzban
2007-11-14 9:43 ` Vaeth
2007-11-14 9:54 ` Matthias Schwarzott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711141054.38671.zzam@gentoo.org \
--to=zzam@gentoo.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).