[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:
@ -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%%.*}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user