On Wed, 20 Sep 2006 14:35:09 +0100, Neil Bothwick wrote:

> I haven't tried using it for this, but I wonder if RC_USE_CONFIG_PROFILE
> would help. See /etc/conf.d/rc for details but basically you set up
> different configs for different runlevels, so you could have a different
> runlevel for each situation, but make the actual runlevel directories
> symlinks to default. Selecting the runlevel on rebooting would certainly
> pick up the appropriate config, you'd have to try it to see what happens
> when switching runlevels while running.

I've run a couple of tests now, using different /etc/conf.d/net.runlevel
files. Switching runlevels on the fly doesn't cause the new configs to be
loaded, but restarting the network afterwards does. I expect this is fine
for your needs, as you are unlikely to have the network running while
between locations. Even if you are, you only need to do

rc newrunlevel
/etc/init.d/net.eth0 restart

to switch over. The VPN and other stuff you need to run is easily handled
in the postup() function of the relevant net.runlevel file.


-- 
Neil Bothwick

If this were an actual tagline, it would be funny.

Attachment: signature.asc
Description: PGP signature

Reply via email to