diff --git a/hoodselector/luasrc/usr/sbin/hoodselector b/hoodselector/luasrc/usr/sbin/hoodselector index 377ba4131cbddfccc0c508ba10407d2ec018cdd0..6a742bedeeb3a7c219aef3c7b12fbfa1f467c67f 100755 --- a/hoodselector/luasrc/usr/sbin/hoodselector +++ b/hoodselector/luasrc/usr/sbin/hoodselector @@ -748,7 +748,14 @@ local function get_batman_mesh_network(sorted_wlan_list, defaultHood) vpn_stop() -- remove the ap network because we cannot change -- the settings of the adhoc network if the ap network is still operating - os.execute("iw dev client0 del") + for iface in io.popen(string.format("iw dev"),'r'):lines() do + if iface:match("Interface") then + iface = trim(iface:split("Interface")[2]) + if not iface:match("ibss") then + os.execute("iw dev "..iface.." del") + end + end + end for _, wireless in pairs(sorted_wlan_list) do io.stderr:write("Testing "..wireless["bssid"].."...\n") local ifname = uci:get('wireless', 'ibss_' .. wireless["radio"], 'ifname')