From f17502d3d0e54173f6c843685b4e26a3c7cac89b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 18 Aug 2024 22:10:37 +0200 Subject: check-routeros-update: support switching to stable channel... ... with a feature update in testing channel. --- check-routeros-update.rsc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index d45432a..3584a94 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -125,6 +125,15 @@ } :if ([ $ScriptFromTerminal $ScriptName ] = true) do={ + :if (($Update->"channel") = "testing" && ($NumInstalled & 0xffff0000) < ($NumLatest & 0xffff0000)) do={ + :put ("This is a feature update in testing channel. Switch to channel 'stable'? [y/N]"); + :if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={ + /system/package/update/set channel=stable; + $LogPrint info $ScriptName ("Switched to channel 'stable', please re-run!"); + :error true; + } + } + :put ("Do you want to install RouterOS version " . $Update->"latest-version" . "? [y/N]"); :if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={ $DoUpdate; -- cgit v1.2.3-70-g09d2