ab946f6518f6f6eb373313a897ca47c9682d5cca
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2013-2014 OpenWrt.org
13 local curtime
="$(date +%s)"
14 local maxtime
="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
15 [ $curtime -lt $maxtime ] && date -s @
$maxtime
19 [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -f $RTC_DEV
23 [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -f $RTC_DEV && \
24 logger
-t sysfixtime
"saved '$(date)' to $RTC_DEV"