dynamic network scripts
gerard at linuxfromscratch.org
Sun Jan 30 11:53:13 PST 2005
This may fall beyond the scope of the stock LFS bootscripts. I'll put
the idea forth anyways since I'll be working on it. We'll have to
discuss if it (or something similar) will be included into the
bootscripts package or not.
The issue I'm finding is with the networking setup of my laptop. I have
both wireless and wired network connections depending on where I go. A
little bit of auto-detection wouldn't be a bad thing really. What would
be nice is something as follows:
Run "iwlist wlan0 scan" to see if my home ESSID shows up. If so, I'm
home and will most likely want to connect to it, so run the proper
commands to set my essid and encryption to match and run dhcp to get an
IP address. I also travel to the office a lot with it, so if my home
ESSID isn't in the iwlist output, look for other known ESSIDs and join
those networks if available.
This is much like how it works in Windows where you set a list of
preferred networks and if they are available, automatically connect to
Also, if I want to use a wired connection I might not insert my wireless
card. The network script would check to make sure there is a link of my
regular NIC card. If there is a link (ie a cable is plugged in), run
DHCP on it. If no link, don't bother with DHCP and set a static IP
This is all easily scriptable but not with the current network script.
Some modifications would be required.
Is there interest in such a thing?
/* If Linux doesn't have the solution, you have the wrong problem */
More information about the lfs-dev