add chaos_calmer branch
[15.05/openwrt.git] / package / base-files / files / etc / init.d / sysfixtime
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2013-2014 OpenWrt.org
3
4 START=00
5
6 boot() {
7         local curtime="$(date +%s)"
8         local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
9         [ $curtime -lt $maxtime ] && date -s @$maxtime
10 }
11