mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
14 lines
309 B
Plaintext
14 lines
309 B
Plaintext
|
#!/bin/sh /etc/rc.common
|
||
|
# Copyright (C) 2013-2014 OpenWrt.org
|
||
|
|
||
|
START=00
|
||
|
|
||
|
boot() {
|
||
|
local curtime="$(date +%s)"
|
||
|
local maxtime="$(find /etc -type f -exec date +%s -r {} \; | sort -nr | head -n1)"
|
||
|
[ $curtime -lt $maxtime ] && \
|
||
|
date -s @$maxtime && \
|
||
|
logger -t sysfixtime -p daemon.notice "Time fixed"
|
||
|
}
|
||
|
|