diff options
Diffstat (limited to 'contrib/package/luci-addons/dist')
-rw-r--r-- | contrib/package/luci-addons/dist/etc/init.d/luci-fixtime | 10 |
1 files changed, 10 insertions, 0 deletions
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 0000000000..6a49594225 --- /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 +} |