Op vrijdag 17 maart 2017 09:52:14 CET schreef Per Jessen: > Eric Curtin wrote: > > Hi Guys, > > > > On the rpi3 since it does not seem to have any CMOS battery type thing > > (correct me if I'm wrong), it boots with the epoch time on boot every > > time. > > Same on my nanopi neo air. > > > I have added an internal corporate ntp server to /etc/ntp.conf, which > > works fine, but it takes quite a while for the ntp daemon to sync the > > time. The time needs to be correct as some things I am using on the > > rpi3 depend on the time being correct (such as docker). Generally > > about four minutes in, the time successfully changes: > > > > Thu Jan 1 01:03:50 IST 1970 > > Thu Mar 16 11:45:19 GMT 2017 > > > > I am connected via ethernet, I see the daemon is configured in systemd > > to start after network.target, but it seems this is not enough (maybe > > it's too soon to start the ntp daemon?) to get the time synced > > quickly. > > The ntp start up script includes a '-g' option to allow big jumps > (clearly needed). How much delay do you see between the network coming > up and time being set? > > > Also when this time jump occurs, XFCE decides to lock my screen, so I > > have to login again. > > > > Any ideas on solutions, before I come up with my own? > > What is the real problem - that it takes too long before time is set? > That might suggest that ntpd is having trouble talking to the time > server. Maybe DNS delays?
There is a package, not available in openSUSE, called fake-hwclock, which contains a number of scripts. A file in /etc/fake-hwclock.data is updated by means of a script in /etc/cron.hourly/fake-hwclock.cron.hourly which calls a script in /sbin/fake-hwclock. On a regular shutdown the time in /etc/fake- hwclock.data is also updated. Rather early in the boot process systemd calls fake-hwclock.service, which is a script in /usr/lib/systemd/system/fake-hwclock.service, which takes the time from /etc/fake-hwclock.data. So the time is already close to the time of booting. The package is noarch. The tar file with these files and more can be downloaded from: http://http.debian.net/debian/pool/main/f/fake-hwclock/fake-hwclock_0.11.tar.gz -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
