aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-08-07 16:44:26 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-08-09 16:30:18 +0200
commit3cab917a61cb84b08f99bd7b4a7b59b1a41024ac (patch)
tree62502f529d5b1ef4b11cd1f73e057df569de23cd
parent8428ba890da07417bf5ee58deaa0a04a8fb18f30 (diff)
capsman-download-packages: no download of missing package for wifiwave2
Sadly the log messages from wifiwave2 do not contain any hint what is missing... So it's not possible to download missing files.
-rw-r--r--capsman-download-packages.template.rsc2
-rw-r--r--capsman-download-packages.wifiwave2.rsc26
-rw-r--r--doc/capsman-download-packages.md6
3 files changed, 6 insertions, 28 deletions
diff --git a/capsman-download-packages.template.rsc b/capsman-download-packages.template.rsc
index baa8fc4..4b52569 100644
--- a/capsman-download-packages.template.rsc
+++ b/capsman-download-packages.template.rsc
@@ -55,6 +55,7 @@ $WaitFullyConnected;
}
}
+# NOT /interface/wifiwave2 #
:if ([ :len [ /system/logging/find where topics~"error" !(topics~"!error") \
!(topics~"!caps") action=memory !disabled !invalid ] ] < 1) do={
$LogPrintExit2 warning $0 ("Looks like error messages for 'caps' are not sent to memory. " . \
@@ -81,6 +82,7 @@ $WaitFullyConnected;
}
}
+# NOT /interface/wifiwave2 #
:if ($Updated = true) do={
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
:if ([ :len $Script ] > 0) do={
diff --git a/capsman-download-packages.wifiwave2.rsc b/capsman-download-packages.wifiwave2.rsc
index 817f7d9..af8b8e5 100644
--- a/capsman-download-packages.wifiwave2.rsc
+++ b/capsman-download-packages.wifiwave2.rsc
@@ -53,32 +53,6 @@ $WaitFullyConnected;
}
}
-:if ([ :len [ /system/logging/find where topics~"error" !(topics~"!error") \
- !(topics~"!caps") action=memory !disabled !invalid ] ] < 1) do={
- $LogPrintExit2 warning $0 ("Looks like error messages for 'caps' are not sent to memory. " . \
- "Probably can not download packages automatically.") false;
-} else={
- :if ($Updated = false && [ /system/resource/get uptime ] < 2m) do={
- $LogPrintExit2 info $0 ("No packages downloaded, yet. Delaying for logs.") false;
- :delay 2m;
- }
-}
-
-:foreach Log in=[ /log/find where topics=({"caps"; "error"}) \
- message~("upgrade status: failed, failed to download file '.*-" . $InstalledVersion . \
- "-.*\\.npk', no such file") ] do={
- :local Message [ /log/get $Log message ];
- :local Package [ :pick $Message \
- ([ :find $Message "'" ] + 1) \
- [ :find $Message ("-" . $InstalledVersion . "-") ] ];
- :local Arch [ :pick $Message \
- ([ :find $Message ("-" . $InstalledVersion . "-") ] + 2 + [ :len $InstalledVersion ]) \
- [ :find $Message ".npk" ] ];
- :if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
- :set Updated true;
- }
-}
-
:if ($Updated = true) do={
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
:if ([ :len $Script ] > 0) do={
diff --git a/doc/capsman-download-packages.md b/doc/capsman-download-packages.md
index ccf0f34..d9c76c0 100644
--- a/doc/capsman-download-packages.md
+++ b/doc/capsman-download-packages.md
@@ -39,8 +39,10 @@ For legacy CAPsMAN:
/system/scheduler/add name=capsman-download-packages on-event="/system/script/run capsman-download-packages.capsman;" start-time=startup;
Packages available in local storage in older version are downloaded
-unconditionally. The script tries to download missing packages by guessing
-from system log.
+unconditionally.
+
+If no packages are found the script tries to download missing packages for
+legacy CAPsMAN by guessing from system log.
Usage and invocation
--------------------