Date: Fri, 31 May 2002 14:54:50 -0700 From: Gregory Neil Shapiro <gshapiro@FreeBSD.ORG> To: "Louis A. Mamakos" <louie@TransSys.COM> Cc: freebsd-qa@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: dhclient-enter-hooks (was Re: 4.6-RELEASE delayed) Message-ID: <15607.61738.128410.326284@horsey.gshapiro.net> In-Reply-To: <ygeg008taqm.wl@mille.mahoroba.org> References: <200205311652.g4VGq5YV004136@intruder.bmah.org> <200205311832.g4VIW8IY091328@whizzo.transsys.com> <ygeg008taqm.wl@mille.mahoroba.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "ume" == Hajimu UMEMOTO <ume@mahoroba.org> writes: ume> Hi, >>>>> On Fri, 31 May 2002 14:32:08 -0400 >>>>> "Louis A. Mamakos" <louie@TransSys.COM> said: louie> You can't configure the "update /etc/resolv.conf" behavior, so I had louie> to manually edit the /sbin/dhclient-script to resolve this issue. ume> You can re-define make_resolv_conf() in /etc/dhclient-enter-hooks to ume> don't update /etc/resolv.conf. Please refer dhclient-script(8) ume> manpage. Here is what I use in mine in case it's useful. Personally, I think it should replace the default make_resolv_conf() in /sbin/dhclient-script as it is more intelligent -- it only replaces /etc/resolv.conf if something changes. make_resolv_conf() { # Don't replace /etc/resolv.conf unless something has changed if [ "$reason" != "RENEW" -o "$new_domain_name" != "$old_domain_name" -o \ "$new_domain_name_servers" != "$old_domain_name_servers" ] then echo search $new_domain_name >/etc/resolv.conf for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf done fi } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-qa" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15607.61738.128410.326284>