capsman-download-packages: download a default set for wifiwave2

Well, AX devices can be arm or arm64... So let's just download packages
'routeros' and 'wifiwave2' - crossing fingers... 🤞
This commit is contained in:
Christian Hesse 2023-08-07 17:16:03 +02:00
parent 3cab917a61
commit d0ab951e3f
3 changed files with 26 additions and 2 deletions

View file

@ -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={