From pdh@minotaur.bit.net.au  Tue May 23 01:00:22 2000
Return-Path: <pdh@minotaur.bit.net.au>
Received: from minotaur.bit.net.au (minotaur.bit.net.au [203.18.94.87])
	by hub.freebsd.org (Postfix) with ESMTP id 53DE137B5BA
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 23 May 2000 01:00:13 -0700 (PDT)
	(envelope-from pdh@minotaur.bit.net.au)
Received: (from pdh@localhost)
	by minotaur.bit.net.au (8.9.3/8.9.3) id SAA04432;
	Tue, 23 May 2000 18:00:08 +1000 (EST)
	(envelope-from pdh)
Message-Id: <200005230800.SAA04432@minotaur.bit.net.au>
Date: Tue, 23 May 2000 18:00:08 +1000 (EST)
From: pdh@bit.net.au
Sender: pdh@minotaur.bit.net.au
Reply-To: pdh@bit.net.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] dhclient enter hooks cannot be used to tweak resolv.conf
X-Send-Pr-Version: 3.2

>Number:         18771
>Category:       conf
>Synopsis:       [PATCH] dhclient enter hooks cannot be used to tweak resolv.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 23 01:10:01 PDT 2000
>Closed-Date:    Sat Nov 4 12:24:17 PST 2000
>Last-Modified:  Sat Nov 04 12:25:01 PST 2000
>Originator:     Phil Homewood
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
Asia Online
>Environment:

	

>Description:

	/etc/dhclient-enter-hooks cannot be used to override build of
	/etc/resolv.conf. The "make_resolv_conf" function defined in
	/sbin/dhclient (and overridable in dhclient-enter-hooks) is
	never actually called; its code is actually duplicated instead
	instead of the function being called.

>How-To-Repeat:

	Define a new make_resolv_conf() in /etc/dhclient-enter-hooks
	(I wanted to add to search path) and watch it get ignored.

	Incidentally, would it make more sense to add a "local_search_path"
	or similar to rc.conf and modify dhclient-script to source rc.conf
	and use this variable? (Probably not, but I'll send a patch to do
	it if required.)

>Fix:

--- src/contrib/isc-dhcp/client/scripts/freebsd.orig    Sun Jan 16 08:46:40 2000
+++ src/contrib/isc-dhcp/client/scripts/freebsd Tue May 23 17:50:22 2000
@@ -129,10 +129,7 @@
    then
     ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
   fi
-  echo search $new_domain_name >/etc/resolv.conf
-  for nameserver in $new_domain_name_servers; do
-    echo nameserver $nameserver >>/etc/resolv.conf
-  done
+  make_resolv_conf
   exit_with_hooks 0
 fi


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: johan 
Responsible-Changed-When: Tue Sep 19 11:27:24 PDT 2000 
Responsible-Changed-Why:  
Over to dhcp maintianer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18771 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Sat Nov 4 12:24:17 PST 2000 
State-Changed-Why:  
I'll only make this change in FreeBSD if you get the ISC to agree to the 
same exact change in the version 3 offering. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18771 
>Unformatted:
