RFT: bin/106642: [patch] Allow excluding certain files from mergemaster (8)

Doug Barton dougb at FreeBSD.org
Tue Jul 17 15:09:18 UTC 2007


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



More information about the freebsd-current mailing list