mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
remove uci-defaults/gen_wifi_json.sh
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
This commit is contained in:
parent
4a049cfecd
commit
03d5798ea0
1 changed files with 0 additions and 52 deletions
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue