Subject: Re: /etc/resolv.conf corrupted during DHCP lease renewal
To: None <mark@MCS.VUW.AC.NZ>
From: Simon J. Gerraty <>
List: current-users
Date: 01/27/2001 21:19:05
> The nature of the corruption suggests a shell bug.  Its as if stdout
> is left redirected to resolv.conf - which nothing in the
> dhclient-script excuses.  I might try making it use ksh...

Ok, vanila renewals are fine. The trouble comes only when I change the
ntp servers.  On the 1.5/i486 all was fine, but on the 1.5L/sparc and
presumably the 1.5.1_ALPHA/sparc ("presumably" because I've dissabled
dhclient on it for now), I end up with a corrupted /etc/resolv.conf:

27 Jan 21:07:58 ntpdate[6293]: ntpdate 4.0.99i Thu Nov 23 01:47:19 MET 2000 (1)
27 Jan 21:07:58 ntpdate[6293]: step time server offset 0.070857 sec
27 Jan 21:07:59 ntpdate[6340]: ntpdate 4.0.99i Thu Nov 23 01:47:19 MET 2000 (1)
27 Jan 21:07:59 ntpdate[6340]: step time server offset -0.005317 sec
 ntpdaterestarting cron

which is the stdout from the section which restarts ntpd after
re-building ntp.conf

Using #!/bin/ksh rather than /bin/sh at the start of dhclient-script
seems to fix the problem, so a shell bug seems likely.  I'll test a
little more and file a PR.