From owner-freebsd-mobile Wed Mar 22 1: 3:23 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from trltech.demon.co.uk (trltech.demon.co.uk [194.222.7.191]) by hub.freebsd.org (Postfix) with ESMTP id 6FD7C37BC70 for ; Wed, 22 Mar 2000 01:03:10 -0800 (PST) (envelope-from rsmith@trltech.co.uk) Received: from rdls.sw.wan (rdls.sw.wan [10.1.0.2]) by trltech.demon.co.uk (8.9.3/8.9.3) with ESMTP id JAA06557; Wed, 22 Mar 2000 09:03:07 GMT (envelope-from rsmith@trltech.co.uk) Received: from trltech.co.uk (localhost.sw.wan [127.0.0.1]) by rdls.sw.wan (8.9.3/8.9.3) with ESMTP id JAA49693; Wed, 22 Mar 2000 09:03:06 GMT (envelope-from rsmith@trltech.co.uk) Message-ID: <38D88C4A.A7BC31AF@trltech.co.uk> Date: Wed, 22 Mar 2000 09:03:06 +0000 From: Richard Smith Reply-To: rdls@rdls.net Organization: http://www.trltech.co.uk X-Mailer: Mozilla 4.61 [en] (X11; I; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Lars Eggert Cc: freebsd-mobile@freebsd.org Subject: Re: switching between connected/disconnected operation? References: <14551.49718.603919.823550@hbo.isi.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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