Date: Sat, 5 Jun 2004 21:02:54 +0300 (EEST) From: Nikos Ntarmos <ntarmos@ceid.upatras.gr> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/67613: [PATCH] dhclient-script fails to update /etc/resolv.conf if it's absent and no new domain name is given Message-ID: <20040605180254.CB3E6380@Gatekeeper.ceid.upatras.gr> Resent-Message-ID: <200406051810.i55IAIQf052328@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 67613 >Category: bin >Synopsis: [PATCH] dhclient-script fails to update /etc/resolv.conf if it's absent and no new domain name is given >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: Sat Jun 05 11:10:18 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Nikos Ntarmos >Release: FreeBSD 5.2-CURRENT alpha >Organization: NetCInS Lab. - CEID - UPatras - Greece >Environment: System: FreeBSD Gatekeeper.ceid.upatras.gr 5.2-CURRENT FreeBSD 5.2-CURRENT #17: Wed Jun 2 01:26:26 EEST 2004 root@Gatekeeper.ceid.upatras.gr:/vinum/usr.cur/obj/vinum/usr.cur/src/sys/GATEKEEPER alpha >Description: /sbin/dhclient-script v1.26 fails to update /etc/resolv.conf if no new domain name is given and /etc/resolv.conf doesn't exist. The problem is caused by make_resolv_conf() using 'rm /etc/resolv.conf' as opposed to 'rm -f /etc/resolv.conf'; if /etc/resolv.conf doesn't exist, exit_status is set to 1 and make_resolv_conf() merely returns with a warning sent out to syslog (or stdout). >How-To-Repeat: Try to use DHCP in an environment where your DHCP server provides no domain name. Also check out the following thread on the daemonnews forum: http://support.daemonnews.org/viewtopic.php?t=119 >Fix: --- dhclient-script.orig Sat Jun 5 04:03:13 2004 +++ dhclient-script Sat Jun 5 04:03:42 2004 @@ -16,7 +16,7 @@ ( echo search $new_domain_name >/etc/resolv.conf ) exit_status=$? else - ( rm /etc/resolv.conf ) + ( rm -f /etc/resolv.conf ) exit_status=$? fi if [ $exit_status -ne 0 ]; then >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040605180254.CB3E6380>