Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-06 Thread Andreas Mohr
Hi, On Mon, Jan 06, 2014 at 12:00:02PM +0100, openwrt-devel-requ...@lists.openwrt.org wrote: From: Bastian Bittorf bitt...@bluebottle.com one note about the approach: if somebody (e.g. the piratebox-guy) wants to be more accurate, just set up a cronjob which calls e.g. 'touch

Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-05 Thread Bastian Bittorf
* Etienne CHAMPETIER etienne.champet...@free.fr [06.01.2014 08:48]: +#!/bin/sh /etc/rc.common +# Copyright (C) 2013-2014 OpenWrt.org + +START=00 + +boot() { + CURTIME=`date +%s` + MAXTIME=`find /etc -type f -exec date +%s -r {} \; | sort | tail -n1` + [[ $CURTIME -lt $MAXTIME

[OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-03 Thread Etienne CHAMPETIER
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 Thanks to Bastian Bittorf for the (so) simple idea Signed-off-by: Etienne CHAMPETIER

Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-03 Thread Catalin Patulea
On Jan 3, 2014 1:29 PM, Etienne CHAMPETIER etienne.champet...@free.fr wrote: 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 Thanks

Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-03 Thread Catalin Patulea
On Jan 3, 2014 1:29 PM, Etienne CHAMPETIER etienne.champet...@free.fr wrote: 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 Thanks

Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-03 Thread etienne . champetier
Hi - Mail original - De: Catalin Patulea c...@vv.carleton.ca À: OpenWrt Development List openwrt-devel@lists.openwrt.org Envoyé: Vendredi 3 Janvier 2014 19:39:33 Objet: Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime On Jan 3, 2014 1:29 PM

Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime

2014-01-03 Thread etienne . champetier
Hi again - Mail original - De: Catalin Patulea c...@vv.carleton.ca À: OpenWrt Development List openwrt-devel@lists.openwrt.org Envoyé: Vendredi 3 Janvier 2014 19:43:54 Objet: Re: [OpenWrt-Devel] [PATCH v3] Add sysfixtime init script, replacement of luci_fixtime On Jan 3, 2014 1