Skip to content

Commit

Permalink
check-routeros-update: support switching to stable channel...
Browse files Browse the repository at this point in the history
... with a feature update in testing channel.
  • Loading branch information
eworm-de committed Aug 20, 2024
1 parent d360cc0 commit f17502d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions check-routeros-update.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f17502d

Please sign in to comment.