From owner-freebsd-current@FreeBSD.ORG Tue Jul 17 15:09:18 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66EDB16A401 for ; Tue, 17 Jul 2007 15:09:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 0684C13C428 for ; Tue, 17 Jul 2007 15:09:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 5912 invoked by uid 399); 17 Jul 2007 15:09:17 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 17 Jul 2007 15:09:17 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <469CDB9B.8080903@FreeBSD.org> Date: Tue, 17 Jul 2007 08:09:15 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.4 (X11/20070617) MIME-Version: 1.0 To: freebsd-current@FreeBSD.ORG, marck@rinet.ru, dougb@FreeBSD.ORG References: <200707171031.l6HAVmDZ088205@lurza.secnetix.de> In-Reply-To: <200707171031.l6HAVmDZ088205@lurza.secnetix.de> X-Enigmail-Version: 0.95.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: RFT: bin/106642: [patch] Allow excluding certain files from mergemaster (8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2007 15:09:18 -0000 Oliver Fromme wrote: > On my notebook I have a script /etc/rc.d/net-detect that > pings several IP addresses in order to find out in which > network environment the notebook is used (at the office, > at home with wlan, at home with 100base-t, or no network > at all). The script then adjusts several symlinks based > on the network environment, i.e. several files in /etc > are changed, including rc.conf, ntp.conf, resolv.conf, > fstab (!), hosts and others. > > That script runs as the very first rc script, Ok, that's something that will probably need to stay a custom hack. I am saving your e-mail though, so in case I ever have time to pursue the multiple location thing I can bug you about it. :) FWIW, I have something similar but I run it as rc.local, which works fine for me, and doesn't require any special attention. If I'm at home, it: 1. mounts my nfs partitions 2. does a dynamic update for my home name server to tell it what it's host and IP address are If I'm away, it: 1. Sets its own hostname based on a lookup of the IP it's been assigned Then it always disables moused for the trackpad if there is a USB mouse attached. To handle the ntp.conf issue I have a dhclient-exit-hooks script that dynamically generates ntp.conf using some defaults, or the value of $new_ntp_servers if that is set. The resolv.conf is handled by dhcp as well, with a "prepend domain-name-servers 127.0.0.1;" being the only exciting thing there. hth, Doug -- This .signature sanitized for your protection