Commit 59a3ad01 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

netifd: wireless: iopsys_utils: alternate approach to getting interface status

parent 09715c96
Pipeline #22 failed with stages
......@@ -115,6 +115,7 @@ remove_disabled_vifs() {
local cfg=$1
local vif=$2
#config_load network
config_get is_lan $cfg is_lan "0"
config_get type $cfg type
......@@ -126,6 +127,14 @@ remove_disabled_vifs() {
[ -n "${ifc/wlan*/}" ] && continue
vif_cfg=$(uci show wireless | grep @wifi-iface | grep "ifname=\'$ifc\'" | awk -F '.' '{print $2}')
#test=$(ubus call uci get '{"config":"wireless", "type":"wifi-iface", "match":{"ifname":"'$ifc'"}}' | grep "\.name" | awk -F ' ' '{print $2}')
#vif_cfg="${test//[\",]}"
#
#config_load wireless
#config_get device $vif_cfg device
#config_get radio_disabled $device disabled
#config_get disabled $vif_cfg disabled
#config_get net $vif_cfg network
device=$(uci -q get wireless.$vif_cfg.device)
radio_disabled=$(uci -q get wireless.$device.disabled)
......@@ -142,6 +151,13 @@ network_remove_disabled_vifs() {
config_foreach remove_disabled_vifs interface
}
network_add_vifs() {
nets=$(uci show network | grep network.*.interface | awk -F'[.,=]' '{print$2}')
config_load wireless
config_foreach add_to_network wifi-iface "$nets"
}
add_to_network() {
local cfg=$1
local nets=$2
......@@ -175,11 +191,4 @@ add_to_network() {
uci -q set network.$net.ifname="$(echo $ifname | tr ' ' '\n' | sort -u | tr '\n' ' ' | sed 's/[ \t]*$//')"
done
uci commit network
}
network_add_vifs() {
nets=$(uci show network | grep network.*.interface | awk -F'[.,=]' '{print$2}')
config_load wireless
config_foreach add_to_network wifi-iface "$nets"
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment