[Summary] Network Bootscript Enhancements

Nathan Coulson conathan at conet.dyndns.org
Sat Jul 3 01:32:06 PDT 2004


We were discussing [on #be-lfs] the current state of networking in the
lfs-bootscripts.

First, we are going to enable the OPTION of using hotplug to bring up
interfaces [like eth0], and will require the following changes
a) symlink ifup/down to /sbin/if{up,down}.  (either that, or make a LFS
specific patch against hotplug).
b) hotplug [in net.agent] defines the environmental variable IN_HOTPLUG. 
the ifup/down scripts should be modified to check that variable, and
contrast it to the ONHOTPLUG [name pending] variable in ifconfig.eth0.

I think Alexander had a couple bugs that he wanted to fix also.  [Hotplug
related]


Second off, we were discussing the fact that eth0 is a interface, while
TCP/IP and IPX, and PPPOE were protocols.  [well, the discussion started
on how aliases did not work with hotplug, the way I suggested (which was
eth0:0) on the lists earlier].  if a hotplug event occurs, the hotplug
script only knows to call ifup eth0.  [and not the IPX, or eth0:0, or
whatever else]

I wrote down the ideas we came up with [Good or Bad], if anyone could
cobble together anything better.

First idea we had, was using an ALIAS="ipx1,ipx2,eth0:1], which could run
the other scripts.  [require some changes to /etc/rc.d/init.d/network].  I
decided to see how the ipx/pppoe script did it (and I noticed that IPX
stuck in a IPXDEV=eth0).  This seems fundamentally flawed, as for static
IP configuration and DHCP, we use the extention of the ifconfig.eth0 to
configure it].

There is also the option of using 00-ifconfig.eth0 01-ifconfig.eth0

Also thinking about specifying multiple SERVICE variables [SERVICE1,
SERVICE2] in the ifconfig.eth0 file.  It'll be a bit tricky to program,
and could get a bit messy when editing the ifconfig.eth0

We were also thinking about using  multiple files for one interface, that
we can use a directory.  (May be overkill, but nicely organized) This
would require the following changes.
a) modify /etc/rc.d/init.d/network to find out if ifconfig.eth0 is a file
or directory.  if it is a file, source it for ONBOOT=yes (what we do now),
or if it is a directory, check for ONBOOT=yes in ifconfig.eth0/config. 
After it does one of the 2 above things, it runs ifup eth0 as normal.  (I
want to keep it compatible with previous configurations, if your wondering
why I have both).
b) modify ifup to handle the above directory scheme, for each file in
ifconfig.eth0/protocols

(Proposed Directory Scheme)
/etc/sysconfig/network-devices/ifconfig.eth0/config [ONBOOT, and ONHOTPLUG]
/etc/sysconfig/network-devices/ifconfig.eth0/routes [Keven P Flemming's
enhancement, seen in "Patch for bootscripts to support static routes"]
/etc/sysconfig/network-devices/ifconfig.eth0/protocols/* [replaces
origional ifconfig.eth0 file]




Just to state where we are, what we currently have works fine except for
hotplug, and the organization is fundamentally flawed [specifying the
interface in the ifconfig.* file, where * SHOULD be the interface].  I
would at least like to modify the configuration for network interfaces.



More information about the lfs-dev mailing list