I have just installed RC5, and I am testing it in an "unfriendly" environment. I am trying to set up openwrt so that if the internet connection is not available at boot, it still can start correctly and become fully functional when internet connection becomes available. I am having issues with setting the time in this process.
Question 1:
I have installed openntpd, then checked if it works (it does) and then removed the WAN cable and reboot. 20 minutes after reboot, I have plugged in the WAN interface, and found that ntpd (that's still running) cannot successfully set time, even if it can now reach the time servers.
From times to times, it tries to adjust time and fails like this:
Jan 1 00:23:15 (none) kern.info /usr/sbin/ntpd[583]: adjusting local clock by 197191402.822987s
Jan 1 00:23:15 (none) kern.crit /usr/sbin/ntpd[583]: adjtime failed: Invalid argument
So it seems that ntpd can set time properly only at startup, and cannot set it if it tries after 20 minutes from the startup.
Why?
Question 2:
ntpclient (not ntpd) takes its ntp server from a nvram variable, that contains two ip addresses by default (at least on the Asus WL500G Deluxe that I am installing on). I thought about using "pool.ntp.org" instead of these IP addresses, but what happens if the DNS resolution is not available when ntpclient starts? I mean, if I connect the WAN interface some times after starting ntpclient, can it solve the hostnames, or must I restart it?