On Tue, Aug 19, 2014 at 1:25 PM, Robert Moskowitz <rgm(a)htt-consult.com> wrote:
A lot of the arm boards, or so I have been told, are like mine; no
Pretty much all boards, well at least the 20 odd I have, have a RTC,
the problem is that they aren't battery backed.
This is causing a lot of interesting problems with boot up until ntp
the time (or is it ntpdate?).
chrony is the default. What are the "interesting" problems?
So I was thing of how to 'fix' this. Over on the Redsleeve
list a fellow
that is dealing with this on his RasberryPi noted:
This might be one solution if someone took it on (I have no skills in coding
or building packages).
But I was thinking of a scripted approach.
First you need a file that has date/time in a format that it can be piped
into the date command like:
date < /etc/fixtime
The image build process would put the build date into this file for
starters. At firstboot, if the time is near zero (some seconds having
passed since poweron), a few things happen:
The fixtime script is run to set the time to the image build date/time.
The fixtime script is set to run at every boot as one of the first
A cron job is enabled (hourly or dayly) to update /etc/fixtime so the next
boot will have a more current time.
I probably have the skills to write a fixtime script and a cron fixtime
update, but I don't know how to alter the boot process. But I think that
such a process is needed to address all the little oddities that come up
when the system boots with time ZERO. And think about desktop setup where
only after the user logs into wireless can ntp get the time.
A lot of networks, even with restricted wifi networks, provide ntp to
ensure sync of time before login.