Subject: Re: CVS commit: src/usr.sbin/ntp/ntptrace
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 12/28/2003 18:10:05
In article <Pine.NEB.4.58.0312281144190.207@seduction.immanent.net>,
Frederick Bruckman <fredb@immanent.net> 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

The above is a hack.

>but that's a hack, too. What happens if, instead of your change, we
>set the default host to "localhost." (with trailing dot)?

That works if setup properly.

christos