#!/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" }