mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
check-routeros-update: do not match the channel on neighbor update
While this works for stable, it does not for testing: The testing channel can have "testing" in the string for rc releases, but also "development" for beta releases... and possibly more. Instead match on version string only, with word boundary.
This commit is contained in:
parent
46e48497d5
commit
110bb793b6
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false;
|
||||||
|
|
||||||
:if ($SafeUpdateNeighbor = true) do={
|
:if ($SafeUpdateNeighbor = true) do={
|
||||||
:local Neighbors [ /ip/neighbor/find where platform="MikroTik" identity~$SafeUpdateNeighborIdentity \
|
:local Neighbors [ /ip/neighbor/find where platform="MikroTik" identity~$SafeUpdateNeighborIdentity \
|
||||||
version~("^" . [ $EscapeForRegEx ($Update->"latest-version" . " (" . $Update->"channel" . ")") ]) ];
|
version~("^" . [ $EscapeForRegEx ($Update->"latest-version") ] . "\\b") ];
|
||||||
:if ([ :len $Neighbors ] > 0) do={
|
:if ([ :len $Neighbors ] > 0) do={
|
||||||
:local Neighbor [ /ip/neighbor/get ($Neighbors->0) identity ];
|
:local Neighbor [ /ip/neighbor/get ($Neighbors->0) identity ];
|
||||||
$LogPrintExit2 info $0 ("Seen a neighbor (" . $Neighbor . ") running version " . \
|
$LogPrintExit2 info $0 ("Seen a neighbor (" . $Neighbor . ") running version " . \
|
||||||
|
|
Loading…
Reference in a new issue