From f17342ed6ec05d15cefcc00cfd6b1677175f1fd4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 10 May 2022 14:40:08 +0200 Subject: capsman-rolling-upgrade: RouterOS v7 path syntax --- capsman-rolling-upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/capsman-rolling-upgrade b/capsman-rolling-upgrade index 2893915..e6b1c51 100644 --- a/capsman-rolling-upgrade +++ b/capsman-rolling-upgrade @@ -16,18 +16,18 @@ $ScriptLock $0; -:local InstalledVersion [ / system package update get installed-version ]; +:local InstalledVersion [ /system/package/update/get installed-version ]; -:local RemoteCapCount [ :len [ / caps-man remote-cap find ] ]; +:local RemoteCapCount [ :len [ /caps-man/remote-cap/find ] ]; :if ($RemoteCapCount > 0) do={ :local Delay (600 / $RemoteCapCount); :if ($Delay > 120) do={ :set Delay 120; } - :foreach RemoteCap in=[ / caps-man remote-cap find where version!=$InstalledVersion ] do={ - :local RemoteCapVal [ / caps-man remote-cap get $RemoteCap ]; + :foreach RemoteCap in=[ /caps-man/remote-cap/find where version!=$InstalledVersion ] do={ + :local RemoteCapVal [ /caps-man/remote-cap/get $RemoteCap ]; :if ([ :len $RemoteCapVal ] > 1) do={ $LogPrintExit2 info $0 ("Starting upgrade for " . $RemoteCapVal->"name" . \ " (" . $RemoteCapVal->"identity" . ")...") false; - / caps-man remote-cap upgrade $RemoteCap; + /caps-man/remote-cap/upgrade $RemoteCap; } else={ $LogPrintExit2 warning $0 ("Remote CAP vanished, skipping upgrade.") false; } -- cgit v1.2.3-70-g09d2