From 94a98c7004178f5fd9e861747a588a0dc5415fe1 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 27 Mar 2010 02:45:36 +0000 Subject: [PATCH] luci-0.9: merge r5942 --- modules/admin-core/root/etc/init.d/luci_fixtime | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/admin-core/root/etc/init.d/luci_fixtime b/modules/admin-core/root/etc/init.d/luci_fixtime index f300e45b9..e03d60e1a 100755 --- a/modules/admin-core/root/etc/init.d/luci_fixtime +++ b/modules/admin-core/root/etc/init.d/luci_fixtime @@ -1,11 +1,16 @@ #!/bin/sh /etc/rc.common START=05 +STOP=95 start() { cat <<' EOF' | lua -l luci.fs -l luci.util - if (os.time() < 1000000000) then - os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime("/etc/init.d/luci_fixtime"))) + os.execute('date -s ' .. os.date('%Y%m%d%H%M', luci.fs.mtime("/etc/init.d/luci_fixtime"))) end EOF } + +stop() { + [[ -w /etc/init.d/luci_fixtime ]] && touch /etc/init.d/luci_fixtime +} -- 2.25.1