And firstboot.
On 08/17/2014 08:22 AM, Jacco Ligthart wrote:
* I still miss the RTC on these machines. is there a script somewhere
that sets the time to the last known date, so that (in case of missing
network connectivity) the clock never goes backwards. maybe something
like this: http://zenit.senecac.on.ca/wiki/index.php/Nortc
I have the same issue with my Cubieboards and was thinking about the
following 'simple' set of scripts.
First in the build have a file in say /etc/time/ called lasttime. The
original contents of this file is the time the image was built.
One of the first steps is to check for time not being close to zero
(nortc). If nortc, pipe this file into the date command to set the
system date.
Since nortc, create an hourly or dayly cron job that updates the content
of lasttime. Thus at next boot, the time set will be the last time this
file was updated.
Seems simple. And needed.
Unfortunately I do not know how to add a script into the boot process,
as it should be easy to create this file and the script to pipe it into
'date'.
_______________________________________________
users mailing list
[email protected]
http://lists.redsleeve.org/mailman/listinfo/users