[packages] ddns-scripts: use /proc/uptime as time reference, this makes it immune against time warps (#8557)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24869 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow
2011-01-01 16:52:37 +00:00
parent eacdb63ba2
commit e9cf1d2d3f
3 changed files with 11 additions and 4 deletions

View File

@ -122,3 +122,10 @@ start_daemon_for_all_ddns_sections()
/usr/lib/ddns/dynamic_dns_updater.sh $section 0 > /dev/null 2>&1 &
done
}
monotonic_time()
{
local uptime
read uptime < /proc/uptime
echo "${uptime%%.*}"
}