Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] udev module loading order

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Arwed von Merkatz <v.merkatz AT gmx.net>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] udev module loading order
  • Date: Fri, 14 Apr 2006 11:42:14 +0200

On Fri, Apr 14, 2006 at 05:01:14AM +0300, Juuso Alasuutari wrote:
> On Thursday 13 April 2006 19:23, Chris Dombroski wrote:
> > Quoting Juuso Alasuutari <iuso AT sourcemage.org>:
> <snip>
> > > What I've described here is imho the last and most annoying thing
> > > standing between us and The Future(TM). Yes, kill the beast that is
> > > hotplug. So I'm asking for ideas on how we could at least ensure that
> > > the
> > > network interfaces are consistent from boot one. Maybe add a script to
> > > the udev spell which automatically creates 00-binding.rules to carve the
> > > interface loading order in stone? I don't think it would be difficult.
> > >
> > > Juuso
> >
> > I don't know about an automatic way of doing something intelligent,
> > but writing persistent device rules looks to be pretty simple (#1).
> > I've written rules for the cards on my firewall; I haven't tested them
> > outside of udevtest yet, but they should work:
> >
> > root@creator:~# cat /etc/udev/rules.d/00-persistent-net.rules
> > KERNEL=="eth*",SYSFS{address}=="00:20:18:d9:49:19",NAME="eth0"
> > KERNEL=="eth*",SYSFS{address}=="00:04:5a:7a:d3:01",NAME="eth1"
> <snip>
>
> That's exactly what I had in mind. I use those rules too. It would be good
> if
> we could automatically add them.
>
> The tricky part is extracting the required info (MAC addresses). It can be
> done with ifconfig, but first we have to make sure that the drivers are
> _loaded_ in the first place. Otherwise there's not much to read from.

Using ifconfig sounds a lot harder than just asking sysfs for it. The
driver still has to be loaded first, but then it's just a matter of 'cat
/sys/class/net/eth0/address'

--
Arwed v. Merkatz Source Mage GNU/Linux developer
http://www.sourcemage.org




Archive powered by MHonArc 2.6.24.

Top of Page