ntp init script
bruce.dubbs at gmail.com
Mon Aug 23 15:10:27 PDT 2010
Jeremy Huntwork wrote:
> On 8/23/10 4:54 PM, Bruce Dubbs wrote:
>> Since we use *pool.ntp.org, how would you propose doing that?
>> I agree that it would be nice, but I don't know how.
> I don't know either, at least, I haven't given much thought to it. My
> solution for myself was just to assume a correct date has been set at
> install and kill the -q in the init script entirely.
> This works:
> if ping -c1 0.pool.ntp.org >/dev/null 2>&1 ; then echo yay ; fi
Thee are a couple of problems here. First the version of ping we have
does not have a settable timeout (other versions do have that). If
there is no network, the boot will hang for a while waiting for ping
response or timeout.
Second, a ping to pool is insufficient. The pool server returns one or
more IP addresses to get the actual ntp server. For instance right now
+ntp1.Rescomp.Be 188.8.131.52 3 u 15 128 377 62.358 -33.688
184.108.40.206 .STEP. 16 u - 1024 0 0.000 0.000
*ntp.your.org .CDMA. 1 u 74 128 377 42.306 -32.980
+draco.netservic 220.127.116.11 2 u 70 128 377 54.936 -27.061
What if the ntp server provided is down like in the 2nd entry above?
This problem is not easily solved.
More information about the blfs-dev