upgrades: Always schedule a reboot at 02:00 local time

Test:

- Downgrade kernel (linux-image-amd64) to earlier version.
- Reboot into the older kernel.
- Remove the newer kernel package.
- Run FreedomBox in develop mode.
- Run unattended-upgrades --debug to upgrade all packages.
- At the end a message is printed that shutdown is scheduled.
- Check /run/systemd/shutdown/scheduled file and see that microseconds since
  epoch is set to tomorrow 02:00 local time.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2020-05-18 13:34:11 -07:00
parent 7c38dad03d
commit 6ee60647c9
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -18,3 +18,7 @@ Unattended-Upgrade::Origins-Pattern {
// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";
// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
Unattended-Upgrade::Automatic-Reboot-Time "02:00";