From owner-freebsd-questions@FreeBSD.ORG Fri May 30 11:40:33 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF59837B401 for ; Fri, 30 May 2003 11:40:32 -0700 (PDT) Received: from mail-shield2.njit.edu (mail-shield2.njit.edu [128.235.251.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF4D343F3F for ; Fri, 30 May 2003 11:40:31 -0700 (PDT) (envelope-from kellers@njit.edu) Received: (from uucp@localhost) by mail-shield2.njit.edu (8.11.6/8.11.6) id h4UIeUs15535; Fri, 30 May 2003 14:40:30 -0400 (EDT) Received: from nodnsquery(128.235.251.173) by mail-shield2.njit.edu via csmap (V4.1) id srcAAA65ayvE; Fri, 30 May 03 14:40:29 -0400 Received: from admcluster.njit.edu (admactive.njit.edu [128.235.184.198]) by mail-gw5.njit.edu (8.12.9/8.12.4) with ESMTP id h4UIeTWu013820; Fri, 30 May 2003 14:40:29 -0400 (EDT) Received: from dhcp187-25.njit.edu ([128.235.187.25]) by admcluster.njit.edu with Microsoft SMTPSVC(5.0.2195.5329); Fri, 30 May 2003 14:40:29 -0400 From: T Kellers To: "John Straiton" , "'Laszlo Vagner'" , Date: Fri, 30 May 2003 14:40:29 -0400 User-Agent: KMail/1.5.2 References: <006e01c326d8$8030f770$1916c60a@win2k.clickcom.com> In-Reply-To: <006e01c326d8$8030f770$1916c60a@win2k.clickcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305301440.29266.kellers@njit.edu> X-OriginalArrivalTime: 30 May 2003 18:40:29.0453 (UTC) FILETIME=[F1986BD0:01C326DA] Subject: Re: how to stop resolv.conf from being updated X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 18:40:34 -0000 A sledgehammer approach to make it work: Comment out the following lines from /sbin/dhclient-script make_resolv_conf() { if [ x"$new_domain_name_servers" != x ]; then if [ "x$new_domain_name" != x ]; then echo search $new_domain_name >/etc/resolv.conf else rm /etc/resolv.conf fi for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf done fi } This will prevent dhcp from making a new /etc/resolv.conf file (on boot, re-boot). Whatever nameserver you enter in /etc/resolv.conf will stay put. (I had to take this approach some years ago when I was using an apple airport basestation as my gateway, and the dhcp server software kept assigning 10.0.1.1 as my nameserver in /etc/resolv.conf.) Check the dhclient.conf man page, too, for less drastic measures. Tim Kellers CPE/NJIT On Friday 30 May 2003 02:22 pm, John Straiton wrote: >You could always use chflags to make the file un-writeable... Tho' there >is probably a better solution > >#chflags schg /etc/resolv.conf > >John Straiton >jks@clickcom.com >Clickcom, Inc >704-365-9970x101 > >> -----Original Message----- >> From: owner-freebsd-questions@freebsd.org >> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of >> Laszlo Vagner >> Sent: Friday, May 30, 2003 2:09 PM >> To: questions@freebsd.org >> Subject: how to stop resolv.conf from being updated >> >> >> I am using DHCP on a cable modem and my >> providers nameserver really sucks >> but changing my resolv.conf repairs >> the lookups for a little while then it gets >> set back to them upon bootup. >> >> how do i make it stay the way i set it. >> >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/free> bsd-questions >> >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" > >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"