dhclient trashes my resolv.conf
Matthew N. Dodd
mdodd at FreeBSD.ORG
Wed Oct 27 23:25:07 PDT 2004
On Thu, 28 Oct 2004, Oliver Lehmann wrote:
> Problem is, I have "options" in my resolv.conf which will be still lost
> then.
I'm using something like the following (actually what I'm using
regenerates named.conf and reloads the nameserver but we won't go into
that).
Index: dhclient-script.sh
===================================================================
RCS file: /home/cvs/ncvs/src/sbin/dhclient/dhclient-script.sh,v
retrieving revision 1.2
diff -u -u -r1.2 dhclient-script.sh
--- dhclient-script.sh 1 Feb 2002 18:46:58 -0000 1.2
+++ dhclient-script.sh 18 Sep 2003 02:31:51 -0000
@@ -83,7 +83,8 @@
#############################################################################
make_resolv_conf ()
{
- if [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then
+ if [ ! -f /etc/dhclient-no-resolv-conf ] &&
+ [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
--
10 40 80 C0 00 FF FF FF FF C0 00 00 00 00 10 AA AA 03 00 00 00 08 00
More information about the freebsd-current
mailing list