Quote:> I was just installing afew new hosts on the ethernet here. Quite afew
> times I had to fix network addresses and restart the networking. So
> what would be the problem with doing the same here? You could have a
> set of network configuration files for each docking station. Then,
> when you dock in a particular station, you could run a shellscript
> which would
> a. softlink the configuration files for this station to the standard
> config files, and
> b. kill all the network daemons & then restart them.
A note on softlinking files: When you want to change the contents of
many files at once, using symlinks, and you want to do this very
quickly (perhaps in order to prevent programs from accessing half of
one configuration and half of another), a technique that I use that
works wonderfully is this:
Suppose you want to have /etc/HOSTNAME, /etc/rc.net1, /etc/rc.net2, and
/etc/foobar different for every configuration. Symlink those four files
like this:
/etc/HOSTNAME -> config/HOSTNAME
/etc/rc.net1 -> config/rc.net1
/etc/rc.net2 -> config/rc.net2
/etc/foobar -> config/foobar
You have a different directory (campus, home, hell) for each configuration,
and these directories are in /etc. /etc/config is a symlink to either
campus, home, or hell. Changing the whole configuration just requires
changing the single symlink /etc/config. Fun, huh?
I used this to manage Xaw libraries (change a symlink for Xaw or Xaw3d),
and for network configuration (distribute the symlinks the same for all
machines, just point the /etc/config to /net/config/whatever).
--
-- Arlie Davis
-- Computers are like Old Testament gods; lots of rules and no mercy.