This is implemented in voyage-sync. Enable in /etc/default/voyage-util:

# set VOYAGE_SAVE_DATE_TIME to "YES" to enable saving date time before reboot
# and restore saved time after reboot.
VOYAGE_SAVE_DATE_TIME="YES"

Teco

Op 19 jan. 2012, om 13:34 heeft Przemysław Matejko het volgende geschreven:

> Hi
> Does Voyage Linux supports boards without hardware clock (I have
> alix2c2)? I mean, if it provides "software clock" script or similar?
> For example, in Gentoo Linux there is a 'swclock' script (in
> baselayout-2) which writes system time during shutdown to file and
> restore it from file during startup - when you reboot device, there is
> only a few seconds clock drift, instead of years; also, this prevents
> problems with some programs which check date of files ("file from the
> future" error), when ntp server is out of sync.
> If there is no script like that, I have an idea how to do it:
> - saving time (filesystem must be rw; command must be invoked as late
> as possible on shutdown):
> 
> date +%m%d%H%M%Y.%S > /place/where/we/write/time
> 
> - restore time (filesystem can be ro; command must be invoked as early
> as possible on startup):
> 
> date $(cat  /place/where/we/write/time)
> 
> I tested these commands on running system and it seems that the
> commands work, but I'm not sure where it should be added into init
> scripts.
> Anyway, I think it's good Idea to add regular init script like that
> (if there is no any) to repositories - after all, Voyage Linux is
> dedicated system for alix devices (most of them doesn't have hardware
> clock, not only mine).
> 
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux@list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux


_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux

Reply via email to