NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/53813: ntpdate should print usage if not provided a server on commandline
On Wed, Dec 26, 2018 at 09:15:00AM +0000, Manuel Bouyer wrote:
> The following reply was made to PR bin/53813; it has been noted by GNATS.
>
> From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
> Subject: Re: bin/53813: ntpdate should print usage if not provided a server
> on commandline
> Date: Wed, 26 Dec 2018 10:12:43 +0100
>
> On Wed, Dec 26, 2018 at 06:30:00AM +0000, edgar%pettijohn-web.com@localhost wrote:
> > If you start ntpdate without any arguments you get this helpful text:
> >
> > ntpdate[23355]: no servers can be used, exiting
> >
> > If provided with the "usage" text it would be easier for the user to discover their mistake.
>
> You don't have to provide a server on command line, it can use the servers
> from ntp.conf. The above message can be because of e.g. transient network
> failure.
>
> --
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
> NetBSD: 26 ans d'experience feront toujours la difference
> --
>
I don't see anywhere that it opens ntp.conf. There is a loadservers() defined
in ntpdate.h, but doesn't appear to be used anywhere.
deathstar$ for i in 1 2 3 4 5 6 6 8 9
> do
> sleep 5 && sudo ntpdate
> done
26 Dec 09:07:46 ntpdate[21316]: no servers can be used, exiting
26 Dec 09:07:51 ntpdate[2749]: no servers can be used, exiting
26 Dec 09:07:56 ntpdate[19587]: no servers can be used, exiting
26 Dec 09:08:01 ntpdate[10166]: no servers can be used, exiting
26 Dec 09:08:06 ntpdate[26607]: no servers can be used, exiting
26 Dec 09:08:11 ntpdate[7338]: no servers can be used, exiting
26 Dec 09:08:16 ntpdate[2113]: no servers can be used, exiting
26 Dec 09:08:21 ntpdate[13595]: no servers can be used, exiting
26 Dec 09:08:26 ntpdate[2840]: no servers can be used, exiting
deathstar$ sudo ntpdate 0.netbsd.pool.ntp.org
26 Dec 09:09:03 ntpdate[7742]: adjust time server 104.238.179.228 offset 0.033862 sec
Home |
Main Index |
Thread Index |
Old Index