From owner-freebsd-current@FreeBSD.ORG Thu Oct 28 20:26:15 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5A2916A4CE for ; Thu, 28 Oct 2004 20:26:15 +0000 (GMT) Received: from avocado.salatschuessel.net (avocado.salatschuessel.net [80.86.187.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C9A243D55 for ; Thu, 28 Oct 2004 20:26:14 +0000 (GMT) (envelope-from lehmann@ans-netz.de) Received: (qmail 39892 invoked from network); 28 Oct 2004 20:25:37 -0000 Received: from unknown (HELO kartoffel.salatschuessel.net) (80.86.187.43) by avocado.salatschuessel.net with SMTP; 28 Oct 2004 20:25:37 -0000 Date: Thu, 28 Oct 2004 22:26:43 +0200 From: Oliver Lehmann To: "Poul-Henning Kamp" Message-Id: <20041028222643.515cfe5d.lehmann@ans-netz.de> In-Reply-To: <2231.1098990944@critter.freebsd.dk> References: <20041028191324.GA18914@speedy.unibe.ch> <2231.1098990944@critter.freebsd.dk> X-Mailer: Sylpheed version 0.9.99 (GTK+ 1.2.10; i386-portbld-freebsd4.10) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org cc: roth@iam.unibe.ch Subject: Re: dhclient trashes my resolv.conf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 20:26:15 -0000 Poul-Henning Kamp wrote: > The workaround I use: > > chflags noschg /etc/resolv.conf > _no_schg? I thought setting schg would be a good idea, (but an ugly hack too ;), but regarding to: ( rm -f /etc/resolv.conf ) exit_status=$? fi if [ $exit_status -ne 0 ]; then $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status" It should log some warnings... because rm -f exits with $? != 0 in case of "operation not permitted" because of schg -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/