Skip to content
Snippets Groups Projects
Commit 9ea92b89 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

add debugging code

parent b3a739e6
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,14 @@ function wait(seconds)
repeat until os.time() > start + seconds
end
function write_new_firmware_version(f_version)
local dateV = os.date()
local fileV = io.open("/root/upgradeV", "a")
fileV:write( f_version .. " | " .. dateV .. '\n')
fileV:close()
return 0
end
local foreach_count=1
for originator in io.popen(string.format("cat /sys/kernel/debug/batman_adv/bat0/originators"), 'r'):lines() do
if foreach_count > 2 then
......@@ -210,6 +218,8 @@ local function autoupdate(mirror)
wait(14400) -- Wait for 4h
end
write_new_firmware_version(manifest.version)
os.execute('sync; sysctl -w vm.drop_caches=3')
collectgarbage()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment