Introduce new uci-default functions:
- ucidef_set_wireless_mac_count [count]
Signed-off-by: John Crispin <[email protected]>
---
.../files/lib/functions/uci-defaults.sh | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh
b/package/base-files/files/lib/functions/uci-defaults.sh
index 67862497c0..30ae36949e 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -684,6 +684,27 @@ ucidef_set_country() {
json_select ..
}
+ucidef_set_wireless_mac_count() {
+ local band="$1"
+ local mac_count="$2"
+
+ case "$band" in
+ 2g|5g|6g) ;;
+ *) return;;
+ esac
+ [ -z "$mac_count" ] && return
+
+ json_select_object wlan
+ json_select_object defaults
+ json_select_object ssids
+ json_select_object "$band"
+ json_add_string mac_count "$mac_count"
+ json_select ..
+ json_select ..
+ json_select ..
+ json_select ..
+}
+
ucidef_set_root_password() {
local passwd="$1"
json_select_object credentials
--
2.34.1
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel