mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
net/mwan3: use uptime for ubus age info
If the date is changed by ntp the age value of mwan3 on ubus could jitter. Use instead the uptime value from /proc/uptime which will not change during system run. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
get_uptime() {
|
||||
local uptime=$(cat /proc/uptime)
|
||||
echo "${uptime%%.*}"
|
||||
}
|
||||
Reference in New Issue
Block a user