[pkg-ntp-maintainers] Bug#600661: Bug#600661: ntp: Uses /var/lib/ntp/ntp.conf.dhcp regardless!?

Tero Marttila terom at fixme.fi
Sun May 27 22:37:20 UTC 2012


On 27/05/12 23:55, Kurt Roeckx wrote:
> On Sun, May 27, 2012 at 11:15:48PM +0300, Tero Marttila wrote:
>>
>> It would seem that in some scenarios reconfiguring
>> /etc/network/interfaces from dhcp to static after install leaves a
>> stale /var/lib/ntp/ntp.conf.dhcp around?
>
> It shouldn't, I do this all the time, never ran into this problem.
>
> It's probably because you do something so that the dhcp client
> doesn't have any chance to tell ntp to stop using that file.

Agreed; a successful `ifdown eth0` before reconfiguring the interface will 
remove the ntp.conf.dhcp. However, it is regrettably easy to forget/omit this 
step before reconfiguring /etc/network/interfaces.

>> Purging /ntp/ntp.conf.dhcp
>> on boot would be a start, but in this case, the server has not been
>> rebooted once since it was installed...
>
> It should actually purge that file on reboot.

On a fresh VM with Debian Squeeze 6.0.5 installed (netinst + DHCP), with 
`apt-get install ntp` such that rebooting gives me a /var/lib/ntp/ntp.conf.dhcp;

Editing /etc/network/interfaces to replace the default 'iface eth0 inet dhcp' 
with 'iface eth0 inet static' + address/netmask/gateway, and immediately 
rebooting, leaves me with a persistent stale /var/lib/ntp/ntp.conf.dhcp that 
does not go away.

A stale ntp.conf.dhcp that persists across reboots will be surprising to 
administrators, and not always that easy to notice (the NTP servers supplied 
via DHCP during install may continue to function for some time before being 
taken out of service).

I am unable to find any reference to purging the ntp.conf.dhcp at boot in 
Squeeze's /etc or the recent packages.debian.org changelogs? I do not have a 
wheezy/sid install available for testing, though.

  -- Tero Marttila





More information about the pkg-ntp-maintainers mailing list