Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2000 14:05:10 -0700
From:      "Crist J. Clark" <cjc@cjc-desktop.reflexcom.com>
To:        Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc:        mobile@FreeBSD.ORG
Subject:   Re: Configuration profiles
Message-ID:  <20000729140510.C7953@cjc-desktop.reflexcom.com>
In-Reply-To: <xzpd7jxdi5d.fsf@flood.ping.uio.no>; from des@flood.ping.uio.no on Sat, Jul 29, 2000 at 12:06:22AM %2B0200
References:  <xzpd7jxdi5d.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
[This mail was resent due to delivery problems. If you have received it 
twice, please ignore. Sorry for any inconvenience.]

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




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