[pkg-ntp-maintainers] Bug#772990: /usr/sbin/ntpdate-debian: does not synchronize time

Michal Suchanek hramrach at gmail.com
Fri Jan 9 20:47:01 UTC 2015


+ . /var/lib/ntpdate/default.dhcp
+ NTPSERVERS=10.10.10.11

Hello,

On 8 January 2015 at 04:24, Peter Eisentraut <petere at debian.org> wrote:
> On Fri, 2014-12-12 at 21:01 +0100, Michal Suchanek wrote:
>> ~# cat /etc/default/ntpdate
>> # The settings in this file are used by the program ntpdate-debian, but not
>> # by the upstream program ntpdate.
>>
>> # Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
>> # so you only have to keep it in one place.
>> NTPDATE_USE_NTP_CONF=no
>>
>> # List of NTP servers to use  (Separate multiple servers with spaces.)
>> # Not used if NTPDATE_USE_NTP_CONF is yes.
>> NTPSERVERS="tik.cesnet.cz"
>>
>> # Additional options to pass to ntpdate
>> NTPOPTIONS=""
>> ~# ntpdate tik.cesnet.cz
>> 12 Dec 19:46:32 ntpdate[1236]: adjust time server 195.113.144.201 offset 0.001415 sec
>> ~# ntpdate-debian
>> 12 Dec 19:46:45 ntpdate[1237]: no server suitable for synchronization found
>
> This works as expected for me.
>
> Please run ntpdate-debian under sh -x to see why it does not pick up
> your server.

The responsible part is

+ . /var/lib/ntpdate/default.dhcp
+ NTPSERVERS=10.10.10.11

which overrides the configuration file.

I had a NTP server on that machine but it's not running so the time is
not synchronizing even when I specify a working NTP server in the
configuration file.

It's obviously not bad thing to consult dhcp but doing so silently is
not so nice.

It should be documented that dhcp supplied server overrides configuration file.

I think it would be useful if the user-supplied configuration actually
overrode dhcp supplied one but that would make supplying a default
server set in the package impractical.

Actually, you could try dhcp supplied server and if that fails try the
one from configuration file.

Thanks

Michal



More information about the pkg-ntp-maintainers mailing list