Skip to Content.
Sympa Menu

baslinux - Re: [BL] dhcp vs static network addressing

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: qwms-avib AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] dhcp vs static network addressing
  • Date: Sat, 24 May 2003 07:28:34 +0000

James Miller wrote:
>
> On a client, one could probably create a simple script
> that would run on bootup and would ask the user to
> choose between dhcp or static addressing.

Or it could let you choose between different static
addresses (for different networks).

> The dhcp choice would start the dhcp daemon,

There is no need to run a daemon on the client. The
server certainly needs a daemon, but the client can
run an ordinary executable to get the needed information
from the server.

> Having done very little script writing, I'd have to
> puzzle for a while over how to do this. But maybe
> others will have a ready idea of how it should look

Perhaps something like this:
---------------------------------------------
select i in home work school; do
case $i in home) ifconfig eth0 192.168.1.3 ;;
work) ifconfig eth0 404.97.36.9 ;;
school) dhcp ;;
*) echo "THAT DOES NOT COMPUTE"
esac;break;done
---------------------------------------------

Of course you could do a fancier menu (with error
trapping) using echo and read, but select works OK.

Cheers,
Steven





Archive powered by MHonArc 2.6.24.

Top of Page