remove uci-defaults/gen_wifi_json.sh

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
This commit is contained in:
Janusz Dziedzic 2023-11-15 10:19:55 +00:00
parent 4a049cfecd
commit 03d5798ea0

View file

@ -1,52 +0,0 @@
#!/bin/sh
[ -f /etc/wifi.json ] && exit 0
. /usr/share/libubox/jshn.sh
is_broadcom() {
[ -e /dev/bcm ] && return 0
return 1
}
is_qualcomm() {
[ -f /proc/device-tree/compatible ] || return
strings /proc/device-tree/compatible | grep -qE '^(qcom,|ipq,)'; return
}
if is_broadcom; then
ifname="wl*"
family="bcmwl nl80211"
group="scan"
else
ifname="wlan*"
family="nl80211"
if is_qualcomm; then
group="scan"
else
group="scan config mlme vendor"
fi
fi
json_init
json_add_array "events"
for fm in $family; do
echo fm=$fm
json_add_object ""
json_add_string "type" "wifi-event"
json_add_string "name" "$fm"
json_add_string "ifname" "$ifname"
json_add_string "family" "$fm"
json_add_array "group"
if [ "$fm" == "bcmwl" ]; then
json_add_string "" "notify"
else
for gr in $group; do
json_add_string "" "$gr"
done
fi
json_select ..
json_select ..
done
json_select ..
json_dump | jq >/etc/wifi.json