diff --git a/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/README b/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/README new file mode 100644 index 0000000..2ddbb8d --- /dev/null +++ b/admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/README @@ -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. diff --git a/admin/autoupdater/files/usr/sbin/autoupdater b/admin/autoupdater/files/usr/sbin/autoupdater index 681d35c..be3e393 100755 --- a/admin/autoupdater/files/usr/sbin/autoupdater +++ b/admin/autoupdater/files/usr/sbin/autoupdater @@ -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