[pkg-ntp-maintainers] Bug#569775: Bug#569775: ntp should not use /etc/ntp.conf.dhcp when dhclient don't receive ntp server

Kurt Roeckx kurt at roeckx.be
Sun Feb 14 14:36:31 UTC 2010


On Sun, Feb 14, 2010 at 10:02:12AM +0200, Ognyan Kulev wrote:
> Package: ntp
> Version: 1:4.2.4p8+dfsg-1
> 
> I configured dhclient to use ntp servers and it worked fine. Then I
> moved to another dhcp server that don't send ntp server. But
> /etc/ntp.conf.dhcp file have stayed and it is wrongly used by ntp. (The
> previously sent ntp server was 192.168.0.1 - the DHCP/gateway server
> itself. In the new environment there's no NTP server at this address and
> ntp suddenly and quietly stopped synchronizing time.)
> 
> There should be some check if /etc/ntp.conf.dhcp is generated by current
> dhclient session. If it's left-over from previous session, it should not
> be used.

The script in /etc/dhcp3/dhclient-exit-hooks.d/ntp
should be removing /var/lib/ntp/ntp.conf.dhcp
when you no longer have ntp servers.  I'm not
sure where you get /etc/ntp.conf.dhcp from.


Kurt






More information about the pkg-ntp-maintainers mailing list