Subject: Re: CVS commit: src/usr.sbin/ntp/ntptrace
To: Frederick Bruckman <fredb@immanent.net>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 12/28/2003 19:08:44
On Sun, Dec 28, 2003 at 11:49:35AM -0600, Frederick Bruckman wrote:
> On Sun, 28 Dec 2003, Nicolas Joly wrote:
> 
> > On Sun, Dec 28, 2003 at 12:36:56PM +0100, Bernd Ernesti wrote:
> > > Hi,
> > >
> > > IMHO such hacks shouldn't be done.
> > >
> > > Change /etc/nsswitch.conf or use 127.0.0.1 if you really want it.
> >
> > I don't really want it.
> >
> > But without any argument, as described in the man page, ntptrace
> > checks for localhost first, which generate a warning :
> >
> > njoly@hal [~]> ntptrace
> > Host not found.
> > localhost: stratum 2, offset -0.000758, synch distance 0.049004
> > ntp.pasteur.fr: stratum 1, offset 0.000516, synch distance 0.012820, refid 'TDF'
> 
> Ah. I don't get that error because I have localhost in my nameserver:
> 
>   # host localhost
>   localhost.immanent.net has address 127.0.0.1
>   localhost.immanent.net has address ::1
> 
> but that's a hack, too. What happens if, instead of your change, we
> set the default host to "localhost." (with trailing dot)?

njoly@hal [tmp/ntptrace]> ./ntptrace.awk 
localhost.: stratum 2, offset -0.000975, synch distance 0.046202
ntp.pasteur.fr: stratum 1, offset -0.000695, synch distance 0.012560, refid 'TDF'

No warning.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.