From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 26 12:33:36 2011 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33985106566B; Sun, 26 Jun 2011 12:33:36 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (mx1.psconsult.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id AB5948FC12; Sun, 26 Jun 2011 12:33:35 +0000 (UTC) Received: from mx1.psconsult.nl ([80.89.238.138]) by mx1.psconsult.nl (8.14.4/8.14.4) with ESMTP id p5QBtRhv086892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Jun 2011 13:55:32 +0200 (CEST) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.4/8.14.4/Submit) id p5QBtR5K086891; Sun, 26 Jun 2011 13:55:27 +0200 (CEST) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Sun, 26 Jun 2011 13:55:27 +0200 From: Paul Schenkeveld To: freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20110626115527.GA86487@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Automatic per-site configuration X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2011 12:33:36 -0000 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