Add sysfixtime init script, replacement of luci_fixtime
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 29 Jan 2014 13:17:03 +0000 (13:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 29 Jan 2014 13:17:03 +0000 (13:17 +0000)
commit8de851136115ba9cf02f839faef00060970fa217
tree6e2d38711b1723d6090945741bef8ddaab64c80e
parentb1fffd79cad53475d67035b5cc081344df2af63f
Add sysfixtime init script, replacement of luci_fixtime

Simply scan for the most recent file in /etc and set
system time to this file modification time if it's in the future
It allow some time dependent program to work immediatly
without waiting for ntpd to sync

v1: v2: bad approach
v3: simply scan /etc, thanks to Bastian Bittorf for the idea
v4: use sort -n, thanks to Catalin Patulea
v5: use [] instead of [[]], thanks to Andreas Mohr
v6: use openwrt style, thanks to Bastian Bittorf

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
SVN-Revision: 39422
package/base-files/files/etc/init.d/sysfixtime [new file with mode: 0755]