aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--capsman-download-packages.template.rsc14
-rw-r--r--capsman-download-packages.wifiwave2.rsc11
-rw-r--r--doc/capsman-download-packages.md3
3 files changed, 26 insertions, 2 deletions
diff --git a/capsman-download-packages.template.rsc b/capsman-download-packages.template.rsc
index 4b52569..71bced0 100644
--- a/capsman-download-packages.template.rsc
+++ b/capsman-download-packages.template.rsc
@@ -81,8 +81,20 @@ $WaitFullyConnected;
:set Updated true;
}
}
-
# NOT /interface/wifiwave2 #
+# NOT /caps-man #
+:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
+ $LogPrintExit2 info $0 ("No packages available, downloading default set.") false;
+ :foreach Arch in={ "arm"; "arm64" } do={
+ :foreach Package in={ "routeros"; "wifiwave2" } do={
+ :if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
+ :set Updated true;
+ }
+ }
+ }
+}
+# NOT /caps-man #
+
: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 af8b8e5..6a12b2d 100644
--- a/capsman-download-packages.wifiwave2.rsc
+++ b/capsman-download-packages.wifiwave2.rsc
@@ -53,6 +53,17 @@ $WaitFullyConnected;
}
}
+:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
+ $LogPrintExit2 info $0 ("No packages available, downloading default set.") false;
+ :foreach Arch in={ "arm"; "arm64" } do={
+ :foreach Package in={ "routeros"; "wifiwave2" } do={
+ :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 d9c76c0..8174c13 100644
--- a/doc/capsman-download-packages.md
+++ b/doc/capsman-download-packages.md
@@ -42,7 +42,8 @@ Packages available in local storage in older version are downloaded
unconditionally.
If no packages are found the script tries to download missing packages for
-legacy CAPsMAN by guessing from system log.
+legacy CAPsMAN by guessing from system log. For `wifiwave2` a default set
+of packages (`routeros` and `wifiwave2` for *arm* and *arm64*) is downloaded.
Usage and invocation
--------------------