flm01/openwrt/packages/luci/host/etc/init.d/luci_fixtime

12 lines
234 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=05
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")))
end
EOF
}