mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55: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:
@ -83,7 +83,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false;
|
||||
|
||||
:if ($SafeUpdateNeighbor = true) do={
|
||||
: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={
|
||||
:local Neighbor [ /ip/neighbor/get ($Neighbors->0) identity ];
|
||||
$LogPrintExit2 info $0 ("Seen a neighbor (" . $Neighbor . ") running version " . \
|
||||
|
Reference in New Issue
Block a user