70-persistent-net.rules not created

jmscott at setex.ipcallback.com jmscott at setex.ipcallback.com
Sun Jan 17 14:18:02 PST 2010


On Tue, Jan 12, 2010 at 09:07:07PM -0600, jmscott at setex.ipcallback.com wrote:
> On Tue, Jan 12, 2010 at 12:57:25PM -0600, Bruce Dubbs wrote:
> > jmscott at setex.ipcallback.com wrote:
> > 
> > > regarding the following code blurb in LFS 6.5, chapter 7.13.1
> > > 
> > >      for NIC in /sys/class/net/* ; do
> > >          INTERFACE=${NIC##*/} udevadm test --action=add $NIC
> > >      done
> > > 
> > > i've come to the conclusion that something is missing.
> > 
> > Yes, there is something wrong, but it's on your system. I was able to do 
> > this:
> 
> i may have found something.  i was incorrect about the udev
> source not containing the word INTERFACE.
> at line 664 of udev/udev-event.c the value of INTERFACE is being
> conditionally added to the udev property list, which i'm pretty sure
> becomes the environment exported to the script.
> 
> the condition for exporting INTERFACE is that something called
> syspath contains a '/'.
> 
> i'm tracing down what syspath is now.

never really arrived at a conculsion regarding why the INTERFACE
environment variable was not being exported to /lib/udev/write_net_rules.
i was able to alleviate the issue by creating a rules file that 
explicitly exports INTERFACE in /etc/udev/rules.d/69-jmscott.rules.
Ths content of that file follows:

  ENV{INTERFACE}=="",ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", ENV{INTERFACE}:="/sys/class/net/eth0"

this rule exports INTERFACE for eth0, and, hence 
/etc/udev/rules.d/70-persistent-net.rules appears to be written as the book
requires.  obviously, is an ugly hack, but it' the one i'm going to stick
with for the sake of pushing forward with building a bootable linux,
until i get a better understanding if udev.

any coments or advice is appreciated-j



More information about the lfs-support mailing list