aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-26 12:58:49 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-26 12:58:49 +0100
commit6036edb506a7101d95eb293d0509b4ff178d7191 (patch)
tree3558f7f8146ed5b48bc6b38e898f40c45392178a
parent3cd9b9ead57e2c62b0409433114a72d1a1e6f4b0 (diff)
packages-update: use $LogAndError
-rw-r--r--packages-update9
1 files changed, 3 insertions, 6 deletions
diff --git a/packages-update b/packages-update
index b4233c8..d57ee5d 100644
--- a/packages-update
+++ b/packages-update
@@ -14,13 +14,11 @@ $ScriptLock "packages-update";
:local Update [ / system package update get ];
:if ([ :typeof ($Update->"latest-version") ] = "nothing") do={
- :log warning "Latest version is not known.";
- :error "Latest version is not known.";
+ $LogAndError warning "Latest version is not known.";
}
:if ($Update->"installed-version" = $Update->"latest-version") do={
- :log info ("Version " . $Update->"latest-version" . " is already installed.");
- :error "No updates available.";
+ $LogAndError info ("Version " . $Update->"latest-version" . " is already installed.");
}
:foreach Package in=[ / system package find where !bundle ] do={
@@ -49,8 +47,7 @@ $ScriptLock "packages-update";
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
on-event=(":global RandomDelay; \$RandomDelay 3600; " . \
"/ system scheduler remove reboot-for-update; / system reboot;");
- :log info ("Scheduled reboot for update between 03:00 and 04:00.");
- :error ("Scheduled reboot.");
+ $LogAndError info ("Scheduled reboot for update between 03:00 and 04:00.");
}
}