mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-22 20:04:26 +02:00
check-routeros-update: use $LogAndError
This commit is contained in:
parent
9b9ad20b3d
commit
1d93bcbc0d
1 changed files with 3 additions and 4 deletions
|
@ -11,6 +11,7 @@
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
:global ScriptFromTerminal;
|
:global ScriptFromTerminal;
|
||||||
:global SendNotification;
|
:global SendNotification;
|
||||||
|
:global LogAndError;
|
||||||
|
|
||||||
:local DoUpdate do={
|
:local DoUpdate do={
|
||||||
:if ([ / system script print count-only where name="packages-update" ] > 0) 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 ([ / system package print count-only where name="wireless" disabled=no ] > 0) do={
|
||||||
:if ([ / interface wireless cap get enabled ] = true && \
|
:if ([ / interface wireless cap get enabled ] = true && \
|
||||||
[ / caps-man manager get enabled ] = false) do={
|
[ / caps-man manager get enabled ] = false) do={
|
||||||
:log warning "System is managed by CAPsMAN, not checking.";
|
$LogAndError "System is managed by CAPsMAN, not checking.";
|
||||||
:error "Warning: See log for details.";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,8 +37,7 @@
|
||||||
:local Update [ / system package update get ];
|
:local Update [ / system package update get ];
|
||||||
|
|
||||||
:if ([ :len ($Update->"latest-version") ] = 0) do={
|
:if ([ :len ($Update->"latest-version") ] = 0) do={
|
||||||
:log warning "An empty string is not a valid version.";
|
$LogAndError "An empty string is not a valid version.";
|
||||||
:error "Warning: See log for details.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($Update->"installed-version" != $Update->"latest-version") do={
|
:if ($Update->"installed-version" != $Update->"latest-version") do={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue