Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2007 08:09:15 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        freebsd-current@FreeBSD.ORG,  marck@rinet.ru,  dougb@FreeBSD.ORG
Subject:   Re: RFT: bin/106642: [patch] Allow excluding certain files from	mergemaster (8)
Message-ID:  <469CDB9B.8080903@FreeBSD.org>
In-Reply-To: <200707171031.l6HAVmDZ088205@lurza.secnetix.de>

index | next in thread | previous in thread | raw e-mail

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



home | help

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