Hi.
How can I delay service start until router's clock is synchronized?
I'm thinking to add this to /jffs/scripts/init-start
Will this work?
What is the router's clock set to when it boots? Unix epoch (1970)? Firmware build date? Or is there some mechanism that brings the clock closer to reality like in OpenWRT (clock set to a recently modified file's timestamp on jffs)?
What happens if NTP fails. Will the script sleep forever?
Thanks.
How can I delay service start until router's clock is synchronized?
I'm thinking to add this to /jffs/scripts/init-start
Code:
while [ `date +%Y` -lt 2020 ] ; do sleep 10 ; done
What is the router's clock set to when it boots? Unix epoch (1970)? Firmware build date? Or is there some mechanism that brings the clock closer to reality like in OpenWRT (clock set to a recently modified file's timestamp on jffs)?
What happens if NTP fails. Will the script sleep forever?
Thanks.