diff options
author | Christian Hesse <mail@eworm.de> | 2024-08-18 22:10:37 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-08-20 11:08:05 +0200 |
commit | f17502d3d0e54173f6c843685b4e26a3c7cac89b (patch) | |
tree | 4eb151b3788b22f163d2a46d2dc93868db2fdc96 /check-routeros-update.rsc | |
parent | d360cc05becf4363aef07db652e39dd1315a2875 (diff) |
check-routeros-update: support switching to stable channel...
... with a feature update in testing channel.
Diffstat (limited to 'check-routeros-update.rsc')
-rw-r--r-- | check-routeros-update.rsc | 9 |
1 files changed, 9 insertions, 0 deletions
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; |