diff options
author | Christian Hesse <mail@eworm.de> | 2021-04-29 15:10:08 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-04-29 15:34:09 +0200 |
commit | ff4e5339d0103f73bf36f4b63f7ce8970d25e29f (patch) | |
tree | 9013672e57df522d99cc4bc0498228b66d52e9fe | |
parent | afc231596cdec85f148d675ff552a3e4bf444dcd (diff) |
capsman-rolling-upgrade: properly handle vanished cap
-rw-r--r-- | capsman-rolling-upgrade | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/capsman-rolling-upgrade b/capsman-rolling-upgrade index 9e7aec0..4c3b1c7 100644 --- a/capsman-rolling-upgrade +++ b/capsman-rolling-upgrade @@ -24,9 +24,13 @@ $ScriptLock $0; :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 ]; - $LogPrintExit2 info $0 ("Starting upgrade for " . $RemoteCapVal->"name" . \ + :if ([ :len $RemoteCapVal ] > 1) do={ + $LogPrintExit2 info $0 ("Starting upgrade for " . $RemoteCapVal->"name" . \ " (" . $RemoteCapVal->"identity" . ")...") false; - / caps-man remote-cap upgrade [ find where name=$RemoteCapVal->"name" ]; + / caps-man remote-cap upgrade $RemoteCap; + } else={ + $LogPrintExit2 warning $0 ("Remote CAP vanished, skipping upgrade.") false; + } :delay ($Delay . "s"); } } |