From 06f2a62b97a25ddd1b9919d084c626d42cef5489 Mon Sep 17 00:00:00 2001 From: lemoer Date: Fri, 19 Feb 2016 17:24:28 +0100 Subject: [PATCH] autoupdater: add upgrade.d directory. --- admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/README | 3 +++ admin/autoupdater/files/usr/sbin/autoupdater | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 admin/autoupdater/files/usr/lib/autoupdater/upgrade.d/README 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