autoupdater: add upgrade.d directory.

This commit is contained in:
lemoer 2016-02-19 17:24:28 +01:00
parent 04c928eb56
commit 06f2a62b97
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -243,6 +243,7 @@ end
local function autoupdate(mirror)
local download_d_dir = '/usr/lib/autoupdater/download.d'
local abort_d_dir = '/usr/lib/autoupdater/abort.d'
local upgrade_d_dir = '/usr/lib/autoupdater/upgrade.d'
local manifest = read_manifest(mirror)
@ -282,6 +283,8 @@ local function autoupdate(mirror)
return false
end
autoupdater_util.run_dir(upgrade_d_dir)
io.stderr:write('Upgrading firmware...\n')
local null = nixio.open('/dev/null', 'w+')
if null then