autoupdater: add upgrade.d directory.
This commit is contained in:
parent
04c928eb56
commit
06f2a62b97
|
@ -0,0 +1,3 @@
|
||||||
|
Executable files in upgrade.d will be executed directly before the sysupgrade
|
||||||
|
will be started. Downloading the upgrade image was successful and the
|
||||||
|
checksum was correct.
|
|
@ -243,6 +243,7 @@ end
|
||||||
local function autoupdate(mirror)
|
local function autoupdate(mirror)
|
||||||
local download_d_dir = '/usr/lib/autoupdater/download.d'
|
local download_d_dir = '/usr/lib/autoupdater/download.d'
|
||||||
local abort_d_dir = '/usr/lib/autoupdater/abort.d'
|
local abort_d_dir = '/usr/lib/autoupdater/abort.d'
|
||||||
|
local upgrade_d_dir = '/usr/lib/autoupdater/upgrade.d'
|
||||||
|
|
||||||
|
|
||||||
local manifest = read_manifest(mirror)
|
local manifest = read_manifest(mirror)
|
||||||
|
@ -282,6 +283,8 @@ local function autoupdate(mirror)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autoupdater_util.run_dir(upgrade_d_dir)
|
||||||
|
|
||||||
io.stderr:write('Upgrading firmware...\n')
|
io.stderr:write('Upgrading firmware...\n')
|
||||||
local null = nixio.open('/dev/null', 'w+')
|
local null = nixio.open('/dev/null', 'w+')
|
||||||
if null then
|
if null then
|
||||||
|
|
Loading…
Reference in New Issue