From owner-freebsd-mobile Sun Jul 30 15:23:21 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 1CBE737B7F1 for ; Sun, 30 Jul 2000 15:23:16 -0700 (PDT) (envelope-from cjc@184.215.6.64.reflexcom.com) Received: from 184.215.6.64.reflexcom.com ([64.6.215.184]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Sun, 30 Jul 2000 15:22:11 -0700 Received: (from cjc@localhost) by 184.215.6.64.reflexcom.com (8.9.3/8.9.3) id PAA26104 for mobile@FreeBSD.ORG; Sun, 30 Jul 2000 15:23:09 -0700 (PDT) (envelope-from cjc) Date: Sat, 29 Jul 2000 14:05:10 -0700 From: "Crist J. Clark" To: Dag-Erling Smorgrav Cc: mobile@FreeBSD.ORG Subject: Re: Configuration profiles Message-ID: <20000729140510.C7953@cjc-desktop.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from des@flood.ping.uio.no on Sat, Jul 29, 2000 at 12:06:22AM +0200 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [This mail was resent due to delivery problems. If you have received it twice, please ignore.] On Sat, Jul 29, 2000 at 12:06:22AM +0200, Dag-Erling Smorgrav wrote: > Is there any ongoing work to support multiple configuration profiles, > e.g. for laptops that move around and connect to different networks? > I've done some work in that area over the past week or two and would > like to get in touch with anyone who has ideas or opinions on that > matter. I still have not seen a pretty solution. The hack I did (and others probably had/have developed it independently) was pretty much to have multiple copies of /etc depending on where you are. Actually, I don't quite go that far. Have have a directory /etc/location with directories holding the files from /etc that vary from one network to the next and /etc holds symlinks that end up pointing to the files currently in use. Some /etc files already work fine for multiple locations and need not be treated this way, like ppp files, but many just have to be completely switched. Right now, the main ones I need to swap around are rc.conf, sendmail.cf, fstab, and even master.passwd[0] and friends. In a later response you mention user configuration files needed to be different too. I put a custom field in my rc.conf... I can't recall the name at the moment. :/ User configuration files[1] source /etc/rc.conf and use that variable in case-statements to set things up right. I have always been meaning to develop a menu to pop up in the initial stages of boot to ask which location to use, but this requires a hack of /etc/rc, and it just has not happened. Stopping in single-user mode to set things manually is not enough of a hassle to motivate me. [0] passwd(8), well, pwd_mkdb(8), is actually a real pain if you take this approach. It actually will take out symlinked /etc/passwd, /etc/master.passwd, /etc/pwd.db, and /etc/spwd.db and put the real files in those locations. [1] One of the biggest challenges was the fact that in one location I wanted to mount an NFS as home dirs. That's actually why the passwd files and fstab were required to be dynamic. The user config files were already terrifying since the homedirs were mounted across different system architectures, making them work for this was a minor tweak for me. -- Crist J. Clark cjclark@alum.mit.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message