aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-24 20:04:28 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-26 11:51:49 +0100
commit1d93bcbc0ddb731e5c484ab5e6b14c9017b9abe7 (patch)
tree7ca6aae01f1bcaf713d411c446fcc0e897b2c7dc /check-routeros-update
parent9b9ad20b3d2a8bbb92ee35f5d3481508ccac9654 (diff)
check-routeros-update: use $LogAndError
Diffstat (limited to 'check-routeros-update')
-rw-r--r--check-routeros-update7
1 files changed, 3 insertions, 4 deletions
diff --git a/check-routeros-update b/check-routeros-update
index 1791b23..7f14701 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -11,6 +11,7 @@
:global DeviceInfo;
:global ScriptFromTerminal;
:global SendNotification;
+:global LogAndError;
:local DoUpdate do={
:if ([ / system script print count-only where name="packages-update" ] > 0) do={
@@ -24,8 +25,7 @@
:if ([ / system package print count-only where name="wireless" disabled=no ] > 0) do={
:if ([ / interface wireless cap get enabled ] = true && \
[ / caps-man manager get enabled ] = false) do={
- :log warning "System is managed by CAPsMAN, not checking.";
- :error "Warning: See log for details.";
+ $LogAndError "System is managed by CAPsMAN, not checking.";
}
}
@@ -37,8 +37,7 @@
:local Update [ / system package update get ];
:if ([ :len ($Update->"latest-version") ] = 0) do={
- :log warning "An empty string is not a valid version.";
- :error "Warning: See log for details.";
+ $LogAndError "An empty string is not a valid version.";
}
:if ($Update->"installed-version" != $Update->"latest-version") do={