aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-06 15:28:55 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commit03309d4fdb3542c60e81b505ee9a9dc1fd623f5d (patch)
tree5508d7646c1c3b7bc727e6bedd560b197e8c7ec9
parent8d020a4de84cc86f0328a79c6e27bf87a35d45ba (diff)
capsman-download-packages: drop main function, use :do with on-error
-rw-r--r--capsman-download-packages.capsman.rsc10
-rw-r--r--capsman-download-packages.template.rsc10
-rw-r--r--capsman-download-packages.wifi.rsc10
3 files changed, 12 insertions, 18 deletions
diff --git a/capsman-download-packages.capsman.rsc b/capsman-download-packages.capsman.rsc
index cb82a37..d4e900d 100644
--- a/capsman-download-packages.capsman.rsc
+++ b/capsman-download-packages.capsman.rsc
@@ -14,8 +14,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global CleanFilePath;
:global DownloadPackage;
@@ -25,7 +25,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
$WaitFullyConnected;
@@ -78,6 +78,4 @@
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
}
}
-}
-
-$Main [ :jobname ];
+} on-error={ }
diff --git a/capsman-download-packages.template.rsc b/capsman-download-packages.template.rsc
index a76071e..cd4a83b 100644
--- a/capsman-download-packages.template.rsc
+++ b/capsman-download-packages.template.rsc
@@ -15,8 +15,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global CleanFilePath;
:global DownloadPackage;
@@ -26,7 +26,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
$WaitFullyConnected;
@@ -89,6 +89,4 @@
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
}
}
-}
-
-$Main [ :jobname ];
+} on-error={ }
diff --git a/capsman-download-packages.wifi.rsc b/capsman-download-packages.wifi.rsc
index 89af381..633830a 100644
--- a/capsman-download-packages.wifi.rsc
+++ b/capsman-download-packages.wifi.rsc
@@ -14,8 +14,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global CleanFilePath;
:global DownloadPackage;
@@ -25,7 +25,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
$WaitFullyConnected;
@@ -80,6 +80,4 @@
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
}
}
-}
-
-$Main [ :jobname ];
+} on-error={ }