aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-09-13 15:38:31 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-09-13 16:08:59 +0200
commit110bb793b66b1f195eddd0480416b688b8af1a48 (patch)
treea1d2bf3eb10034340318e14e80bd4cd304297ab8 /check-routeros-update.rsc
parent46e48497d5e9ca0627ad325b8d13d9b6d70c061a (diff)
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.
Diffstat (limited to 'check-routeros-update.rsc')
-rw-r--r--check-routeros-update.rsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc
index 73ce7d8..d77164d 100644
--- a/check-routeros-update.rsc
+++ b/check-routeros-update.rsc
@@ -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 " . \