[SPARCbook] changing domains/IP-addresses on the fly
Sunder ROOT
root at anon7b.sunder.net
Sun Feb 20 17:07:43 CST 2000
Something like this
#!/bin/sh
/usr/sbin/ifconfig le0 0.0.0.0 down
/usr/sbin/ifconfig le0 $1 netmask $2 up
route delete 0.0.0.0
route add $3 newgateway
Where the above is a script that you pass three parameters to. The first
is you new IP, the second is your netmask, the third, your new gateway.
You can get away with leaving the DNS server list in /etc/resolv.conf
alone, but it may take longer to resolve names depending on how "far" away
you are from the servers.
It won't change your domain/hostname, but that shouldn't be too big a deal
unless you're running something on your sparcbook that requires it such as
sendmail. :) Fixing that makes things more complex as just running
hostname $4 for example won't change what those services think is the
name.
On Sun, 20 Feb 2000, Jonathan Eisch wrote:
>
>
> --
> jon eisch
> jeisch at boku.net
>
> On Sun, 20 Feb 2000, Stephen Martin wrote:
> > Better yet, does anyone understand locations? It's really poory documented,
>
> Yeah, I tried to use them, but it's a big mess.
> if anyone figures out a bunch of scripts to do various stuff, please share
> them. Anyone notice how much space 'locations' use? I'm thinking it's a
> lot, given what they do.
>
> -Jonathan
>
>
> _______________________________________________
> Sparcbook mailing list - Sparcbook at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sparcbook
>
More information about the SPARCBook
mailing list