Suggestions for refactoring the network scripts

Bruce Dubbs bruce.dubbs at gmail.com
Thu Jul 14 21:53:49 PDT 2011


William Immendorf wrote:
> A year or so ago, I was working on getting Gnome-system-tools to
> support BLFS (https://bugzilla.gnome.org/show_bug.cgi?id=624299).
> While I was doing that, I ran into roadblocks when trying to implement
> the network functions. They were:
> 
> * The configuration files. Instead of a single file, there were
> multiple files for each service, and what service runs is controlled
> by the ONBOOT variable (which is normally supposed to control whenever
> to initialize the device or not), and this made it a mess to implement
> in the backends.

William, did you look at the scripts I sent out earlier this evening. 
The way I set them up, there would be no problem having two or more 
scripts for an interface.  The interface is not tied to the name of the 
file.  I wouldn't suggest more than one script running at boot time though.

For example you could have ifconfig.wlan1 and ifconfig.wlan2.  Bringing 
up the one you want is as easy as 'ifup wlan1'.  That's why I added the 
IFACE variable to the files.

> * The fact that both DHCPCD and dhclient had very similar
> comfiguration files, which made it hard to implement DHCP support in
> the backends.

I have not looked at dhcp or wireless-tools with respect to the new 
scripts.  That's one of the reasons I haven't put them in the book yet.

> Dissecting the scripts further yielded more problems:
> 
> * Absolutely no Wifi support in the network scripts. This is a real
> problem for people who use a laptop (like me), and who don't want to
> lug around a ethernet cable every time they want the internet. You
> can't set the SSID of a network on boot, and those who want to connect
> to a secure network are left out.

> * Zilch IPv6 support. There really aren't many address to go around,
> and a lack of support for IPv6 worries me.

Well actually I think both the new and the old support ipv6.  You just 
have to specify the IP variable correctly.

> And since we are doing major changes to the bootscripts, I suggest
> that we fix the above mentioned issues.
> 
> We should start with only using one configuration file per interface,
> using SERVICE to set which program to use for setting up the network.

We do use SERVICE now.  What do you want to see in one file?  Your 
suggestion is a bit too general.  If you give some specifics, I'll 
certainly consider it.

   -- Bruce




More information about the lfs-dev mailing list