autoupdater : add -F option which (unlike -f) do a update even if autoupdater believes he already has the latest FW - ie. ignoring /lib/gluon/release and taking whatever is signed presented as latest in manifest file on legitimate update servers
This commit is contained in:
parent
fea8f67d5d
commit
9da3e8fb31
|
@ -30,6 +30,8 @@ version_file:close()
|
||||||
-- If force is true the updater will perform an upgrade regardless of
|
-- If force is true the updater will perform an upgrade regardless of
|
||||||
-- the priority and even when it is disabled in uci
|
-- the priority and even when it is disabled in uci
|
||||||
local force = false
|
local force = false
|
||||||
|
-- if you want to skip release test also
|
||||||
|
local superforce = false
|
||||||
|
|
||||||
-- If fallback is true the updater will perform an update only if the
|
-- If fallback is true the updater will perform an update only if the
|
||||||
-- timespan given by the priority and another 24h have passed
|
-- timespan given by the priority and another 24h have passed
|
||||||
|
@ -41,6 +43,9 @@ local function parse_args()
|
||||||
while arg[i] do
|
while arg[i] do
|
||||||
if arg[i] == '-f' then
|
if arg[i] == '-f' then
|
||||||
force = true
|
force = true
|
||||||
|
elseif arg[i] == '-F' then
|
||||||
|
superforce = true
|
||||||
|
force = true
|
||||||
elseif arg[i] == '--fallback' then
|
elseif arg[i] == '--fallback' then
|
||||||
fallback = true
|
fallback = true
|
||||||
elseif arg[i] == '-b' then
|
elseif arg[i] == '-b' then
|
||||||
|
@ -252,8 +257,10 @@ local function autoupdate(mirror)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not autoupdater_version.newer_than(manifest.version, old_version) then
|
if not autoupdater_version.newer_than(manifest.version, old_version) then
|
||||||
|
if superforce ~= true then
|
||||||
|
return true
|
||||||
|
end
|
||||||
io.stderr:write('No new firmware available.\n')
|
io.stderr:write('No new firmware available.\n')
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
io.stderr:write('New version available.\n')
|
io.stderr:write('New version available.\n')
|
||||||
|
|
Loading…
Reference in New Issue