I've got a laptop running Linux.  When I go to work, the laptop gets it's 
IP address via DHCP, at home I have a private IP address that I use (for a 
home network that uses dial up for Internet), and at my other place of 
employ I have a third IP address that is used.
I've created a shell script that will prompt for where I am located, then 
sets the host information appropriate for my location (home,work1,work2).

I was thinking of automating it somewhat but wanted to get some ideas 
before I proceed.
My thought is to create a script that would set the IP address to work2 IP, 
then check to see if the gateway that's in use is available, if it's not 
then set to the private IP for home and see if one of the other computes is 
visible.  If none of the first two work, then assume it's DHCP and set the 
files; of course, non of this takes into account I may boot the computer 
with it not being part of any network.  I'd check for DHCP first, but if 
it's not available, I don't want to wait for the dhcp timeout to occur.

Question, Is it more trouble than it's worth to set something like this 
up?  Does the basic logic of what I want to do look okay?


Any thoughts?

Roger

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to