bin/67613: [PATCH] dhclient-script fails to update /etc/resolv.conf
if it's absent and no new domain name is given
Nikos Ntarmos
ntarmos at ceid.upatras.gr
Sat Jun 5 11:10:19 PDT 2004
>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 at 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:
More information about the freebsd-bugs
mailing list