1 --- etc/rc.initdiskless 2011-01-23 05:59:54.000000000 -0600
2 +++ etc/rc.initdiskless 2011-05-06 12:40:10.940259210 -0500
8 + # <CyberLeo> Keep track of the most recent timestamp for clockskew detection
9 + stamp="$(/usr/bin/stat -f %Um "$j")"
10 + [ "${stamp}" -gt "${newest:-0}" ] && newest="${stamp}"
16 +# Check for clock skew, to make sure the local timestamp is newer than
17 +# the last saveconfig or the date of the image
18 +stamp="$(/usr/bin/stat -f %Um "/COPYRIGHT")"
19 +[ "${stamp}" -gt "${newest:-0}" ] && newest="${stamp}"
20 +if [ "${newest}" -gt "$(/bin/date +%s)" ]
22 + # Clock skew detected! Attempt to correct
23 + correction="$(( ${newest} + 60 ))"
24 + printf "Clock skew detected!\n" >&2
25 + printf " Now (%s) is before newest (%s)\n" "$(/bin/date)" "$(/bin/date -jf %s "${newest}")" >&2
26 + printf "Clock reset to %s\n" "$(/bin/date -f %s "${correction}")" >&2
27 + printf "Run ntpd or ntpdate or manually set correct time!\n" >&2
31 # - Create all required MFS filesystems and populate them from
32 # our templates. Support both a direct template and a dir.cpio.gz
33 # archive. Support dir.remove files containing a list of relative