Make fixtime more reliable
[project/luci.git] / modules / admin-core / root / etc / init.d / luci_fixtime
1 #!/bin/sh /etc/rc.common
2
3 START=05
4
5 start() {
6 cat <<' EOF' | lua -l luci.fs -l luci.util -
7 if (os.time() < 1000000000) then
8 os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime("/etc/init.d/luci_fixtime")))
9 end
10 EOF
11 }