ntpdate start up sequence

Tom Smith tom71713-ubuntu at yahoo.com
Wed Jun 21 21:02:56 UTC 2006


Yeah, that came to mind. I usually prefer not to do that in case IPs 
change... Not that this happens a lot, but the domain name usually stays 
that same either way.

I did come up with a workaround, though. Here it is:

Edit /etc/defaults/ntpdate. Find the line that reads 
NTPSERVERS="ntp.ubuntulinux.org". Change it to:

NTPSERVERS="`/usr/bin/host ntp.ubuntulinux.org <ip of dns server> | grep 
"has address" | /usr/bin/awk '{print $4}'`"

where <ip of dns server> is the DNS server of your ISP.

This works pretty good and only that one lookup is made on the ISP's DNS 
server--the rest are local.

Thanks for the feedback Scott! :-)

Scott Kitterman wrote:

>On Wednesday 21 June 2006 15:43, Tom Smith wrote:
>  
>
>>Ubuntu 5.10
>>ntpdate 4.2.0a
>>
>>I'm setting up a DNS server that will use itself for name resolution,
>>versus using another server. This created a problem with ntpdate.
>>
>>ntpdate starts from /etc/rcS.d, which loads before bind9 or any other
>>non-system services. Because of this, ntpdate is unable to locate the
>>time server that it's looking for (since DNS isn't started when it loads).
>>
>>I haven't been able to find a "clean" way of rectifying this problem (by
>>clean, I mean something that won't be undone upon an update, upgrade, or
>>reinstall of that service).
>>
>>Can anyone offer any suggestions for working around this problem?
>>
>>Thanks in advance for your help!
>>    
>>
>
>One thing that comes to mind is to list the NTP server by IP address.
>
>Scott K
>
>  
>




More information about the ubuntu-users mailing list