From 971ffe47da2fa5b154f0601f9ece2984ac7f5d50 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 14 Jun 2008 15:14:15 +0000 Subject: * luci/libs: move time fix to luci-addons --- contrib/package/luci-addons/dist/etc/init.d/luci-fixtime | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/package/luci-addons/dist/etc/init.d/luci-fixtime (limited to 'contrib/package/luci-addons/dist') diff --git a/contrib/package/luci-addons/dist/etc/init.d/luci-fixtime b/contrib/package/luci-addons/dist/etc/init.d/luci-fixtime new file mode 100644 index 000000000..6a4959422 --- /dev/null +++ b/contrib/package/luci-addons/dist/etc/init.d/luci-fixtime @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common +START=5 + +start() { + cat <<' EOF' | lua -l luci.fs -l luci.sys - + if (os.time() < 1000000000) then + os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime(luci.sys.libpath()))) + end + EOF +} -- cgit v1.2.3