packages-update: support deferred reboot on auto-update

Closes #56
This commit is contained in:
Christian Hesse 2024-01-26 09:11:17 +01:00
parent 98f26989f5
commit 62f33d7b19
5 changed files with 24 additions and 1 deletions

View file

@ -18,6 +18,8 @@
:global ScriptLock;
:global VersionToNum;
:global PackagesUpdateDeferReboot;
:local Schedule do={
:global RebootForUpdate do={
:global RandomDelay;
@ -109,6 +111,11 @@ $ScriptLock $0;
$Schedule;
$LogPrintExit2 info $0 ("Scheduled reboot for update between 03:00 and 04:00.") true;
}
} else={
:if ($PackagesUpdateDeferReboot = true) do={
$Schedule;
$LogPrintExit2 info $0 ("Scheduled reboot for update between 03:00 and 04:00.") true;
}
}
$LogPrintExit2 info $0 ("Rebooting for update.") false;