Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2011 13:55:27 +0200
From:      Paul Schenkeveld <freebsd@psconsult.nl>
To:        freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Automatic per-site configuration
Message-ID:  <20110626115527.GA86487@psconsult.nl>

next in thread | raw e-mail | index | archive | help
Hi,

There must be many others like me who carry a laptop from one site to
another every week.  Currently I have to work at four different sites.

I'd like my FreeBSD 8.2 laptop to automatically start stuff depending
on where I boot it and also my personal login environment depends on
where I am (PRINTER setting in .profile, clients to automatically start
and DISPLAY setting in .xsession, key bindings in .ctwmrc etc.)

Until recently I could look at the fully qualified hostname I got from
DHCP as all DHCP servers gave me a usable hostname but now I also have
to work at various sites where DHCP does not give me a hostname at all.

Getting no hostname from DHCP confuses xdm which defaults to "1"
requiring me to switch to another virtual console and manually set the
hostname to "localhost" or something.

The hostname="foo.bar.tld" in rc.conf is absolute, when set the hostname
obtained from DHCP is ignored.

How do other people solve this?  I'd prefer to to be prompted during
boot and during login for the site I want to configure for.

Kind regards,

Paul Schenkeveld



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