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:12:41AM -0600, edgar%pettijohn-web.com@localhost wrote:
> 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.

Yes, sorry. I now see that the man page mention this only works if netinfo
is compiled in. /etc/rc.d/netdate will fetch itself the servers from
ntp.conf if ntpdate_hosts is not defined. This is what confused me ...

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index