From 12435ff1c53e7ef3b8b63b28860a3f35f8146184 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 8 Mar 2024 12:45:37 +0100 Subject: capsman-rolling-upgrade: switch to $LogPrint --- capsman-rolling-upgrade.capsman.rsc | 8 ++++---- capsman-rolling-upgrade.template.rsc | 8 ++++---- capsman-rolling-upgrade.wifi.rsc | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/capsman-rolling-upgrade.capsman.rsc b/capsman-rolling-upgrade.capsman.rsc index 16a3498..11bfd69 100644 --- a/capsman-rolling-upgrade.capsman.rsc +++ b/capsman-rolling-upgrade.capsman.rsc @@ -18,7 +18,7 @@ :do { :local ScriptName [ :jobname ]; - :global LogPrintExit2; + :global LogPrint; :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ @@ -34,11 +34,11 @@ :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 $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ - " (" . $RemoteCapVal->"identity" . ")...") false; + $LogPrint info $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ + " (" . $RemoteCapVal->"identity" . ")..."); /caps-man/remote-cap/upgrade $RemoteCap; } else={ - $LogPrintExit2 warning $ScriptName ("Remote CAP vanished, skipping upgrade.") false; + $LogPrint warning $ScriptName ("Remote CAP vanished, skipping upgrade."); } :delay ($Delay . "s"); } diff --git a/capsman-rolling-upgrade.template.rsc b/capsman-rolling-upgrade.template.rsc index 45a5f8e..e0effd4 100644 --- a/capsman-rolling-upgrade.template.rsc +++ b/capsman-rolling-upgrade.template.rsc @@ -19,7 +19,7 @@ :do { :local ScriptName [ :jobname ]; - :global LogPrintExit2; + :global LogPrint; :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ @@ -41,12 +41,12 @@ # NOT /caps-man/ # :set ($RemoteCapVal->"name") ($RemoteCapVal->"common-name"); # NOT /caps-man/ # - $LogPrintExit2 info $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ - " (" . $RemoteCapVal->"identity" . ")...") false; + $LogPrint info $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ + " (" . $RemoteCapVal->"identity" . ")..."); /caps-man/remote-cap/upgrade $RemoteCap; /interface/wifi/capsman/remote-cap/upgrade $RemoteCap; } else={ - $LogPrintExit2 warning $ScriptName ("Remote CAP vanished, skipping upgrade.") false; + $LogPrint warning $ScriptName ("Remote CAP vanished, skipping upgrade."); } :delay ($Delay . "s"); } diff --git a/capsman-rolling-upgrade.wifi.rsc b/capsman-rolling-upgrade.wifi.rsc index 63245dc..8ec6f26 100644 --- a/capsman-rolling-upgrade.wifi.rsc +++ b/capsman-rolling-upgrade.wifi.rsc @@ -18,7 +18,7 @@ :do { :local ScriptName [ :jobname ]; - :global LogPrintExit2; + :global LogPrint; :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ @@ -35,11 +35,11 @@ :local RemoteCapVal [ /interface/wifi/capsman/remote-cap/get $RemoteCap ]; :if ([ :len $RemoteCapVal ] > 1) do={ :set ($RemoteCapVal->"name") ($RemoteCapVal->"common-name"); - $LogPrintExit2 info $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ - " (" . $RemoteCapVal->"identity" . ")...") false; + $LogPrint info $ScriptName ("Starting upgrade for " . $RemoteCapVal->"name" . \ + " (" . $RemoteCapVal->"identity" . ")..."); /interface/wifi/capsman/remote-cap/upgrade $RemoteCap; } else={ - $LogPrintExit2 warning $ScriptName ("Remote CAP vanished, skipping upgrade.") false; + $LogPrint warning $ScriptName ("Remote CAP vanished, skipping upgrade."); } :delay ($Delay . "s"); } -- cgit v1.2.3-70-g09d2