Date: Tue, 23 May 2000 18:00:08 +1000 (EST) From: pdh@bit.net.au To: FreeBSD-gnats-submit@freebsd.org Subject: conf/18771: [PATCH] dhclient enter hooks cannot be used to tweak resolv.conf Message-ID: <200005230800.SAA04432@minotaur.bit.net.au>
next in thread | raw e-mail | index | archive | help
>Number: 18771 >Category: conf >Synopsis: [PATCH] dhclient enter hooks cannot be used to tweak resolv.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 23 01:10:01 PDT 2000 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005230800.SAA04432>