luci-0.9: merge r5942

This commit is contained in:
Jo-Philipp Wich 2010-03-27 02:45:36 +00:00
parent ce93183e25
commit 94a98c7004

View file

@ -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
}