Multiple network profiles

Thomas Beneke thomas.beneke at
Fri Oct 8 11:21:56 PDT 2004

Andy Neebel wrote:
> On Fri, 8 Oct 2004 11:29:05 -0600, Nathan Coulson <conathan at> wrote:
>>On Fri, 8 Oct 2004 10:51:06 -0500, Andy Neebel <aneebel at > wrote:
>>>I have no idea what list this should go to, but it affect
>>>lfs-bootscripts, so I'm posting here.
>>>I have a laptop that I use at school, and I'm trying to figure out how
>>>to support multiple network locations on it.  The school's network is
>>>based on DHCP, but I'm trying to use static ip's between my laptop and
>>>my tower.  I've looked at the ifup script and it appears that there is
>>>no way to specify which service is started.  Instead, the script just
>>>starts whichever script it wants to.  I'm wondering if anyone knows
>>>how to change the script to accept a third parameter that specifies
>>>the location, or do I need to figure this out myself, and if I do, is
>>>there an interest in adding this to the scripts?
>>>Andy Neebel
>>well, you can easy stick in multiple services into the
>>/etc/sysconfig/ifconfig.* directory, such as
>>use ONBOOT=no in each,
>>then you can say ifup eth0 school, or ifup eth0 home to bring up the
>>individual service.
>>Nathan Coulson (conathan)
>>nathan at linuxfromscratch org
>>conathan at gmail com
> Oh, this is what I was trying to do.  When I looked at the script, it
> didn't look like it was checking to see if a certain service was being
> started, just starting whatever was in ifconfig.*.  I looked again and
> found the line that I missed, thanks.
> Andy

I set env variables in menu.lst (grub) at boot, like:

title linux work
    kernel ..... lan=work
title linux home
    kernel ....  lan=home

Then I modified the network-scripts to get the IP from LAN (lan=work) or 
WLAN (lan=home).


More information about the lfs-dev mailing list