Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2000 09:03:06 +0000
From:      Richard Smith <rsmith@trltech.co.uk>
To:        Lars Eggert <larse@isi.edu>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: switching between connected/disconnected operation?
Message-ID:  <38D88C4A.A7BC31AF@trltech.co.uk>
References:  <14551.49718.603919.823550@hbo.isi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Lars Eggert wrote:
> 
> Hi,
> 
> we're trying to come up with a way to configure our laptops so that we
> can easily switch between connected (i.e. we have a net) and
> disconnected (we have no net) states. This does not need to be
> automatic (would be nice though), having users type "net on|off" in a
> shell is perfectly fine.
> 
> Looking at /etc, it seems that what we'd like requires non-trivial
> changes to the configuration; the laptops we'd like this for run a
> number of services that would need to be started/stopped: NIS, NFS
> (clients), inetd, sendmail, sshd, lpd, amd, named, etc. Some of these
> should be okay to leave running when disconnecting (e.g. inetd, sshd).
> Others (NIS, NFS, amd) must be stopped/restarted.
> 
> Has anyone ever done this? How? Any pointers? This is for 4.0-RELEASE,
> btw.

I have a reasonably straight forward method based on calling a setuid
perl script from an fvwm2 menu. The script writes out a number of config
files: rc.conf.location (included into rc.conf), resolve.conf,
hosts.equiv and hosts. It then sets the hostname and calls pccard_ether,
which configures the network using the new values saved in
rc.conf.location (via rc.conf).

I also write out an fvwmrc.location file, so that the network
configuration and the desktop always reboots into the last set location.
And, just as an added bonus, the screen saver puts the notebook into
standby, but only if we're isolated and running on batteries. It would
be reasonably easy to extend it to start/stop daemons as required.

Isn't Freebsd wonderful :-)

Richard.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38D88C4A.A7BC31AF>