h4ck/lg_webOS/_ipk-building/base-files/source/etc/init.d/sysfixtime

12 lines
247 B
Plaintext
Raw Permalink Normal View History

2016-11-19 00:49:40 +01:00
#!/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 -r {} +%s \; | sort -nr | head -n1)"
[ $curtime -lt $maxtime ] && date -s @$maxtime
}