diff --git a/hoods/files/lib/ffnw/hoods/hoods.json b/hoods/files/lib/ffnw/hoods/hoods.json index e1299570754b38fb26aa4ef0ffcf73b840252328..76499597f9fed94196bf2777c32312cce40c8995 100644 --- a/hoods/files/lib/ffnw/hoods/hoods.json +++ b/hoods/files/lib/ffnw/hoods/hoods.json @@ -835,5 +835,4 @@ ] ] } - -] \ No newline at end of file +] diff --git a/hoodselector/luasrc/usr/sbin/hoodselector b/hoodselector/luasrc/usr/sbin/hoodselector index f9de6e6068539a6edbcb380c6a30fe488b619a3a..e7179cd0b926af01df19a55ad37094036c456065 100755 --- a/hoodselector/luasrc/usr/sbin/hoodselector +++ b/hoodselector/luasrc/usr/sbin/hoodselector @@ -823,7 +823,14 @@ local function get_batman_mesh_network(sorted_wlan_list, defaultHood, meshprefix 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 if wireless["ssid"] == uci:get('wireless', 'ibss_' .. wireless["radio"], 'ssid') then io.stdout:write("Testing IBSS "..wireless["bssid"].."...\n") @@ -1035,7 +1042,7 @@ end if directVPN() then io.stdout:write('VPN connection found.\n') local geo = getGeolocation() - if geo.lat ~= 0 and geo.lon ~= 0 then + if geo.lat ~= nil and geo.lon ~= nil then io.stdout:write('Position found.\n') local geoHood = getHoodByGeo(jhood, geo) if geoHood ~= nil then @@ -1145,6 +1152,10 @@ if next(radios) then exit(0) end io.stdout:write('No neighboring freifunk batman advanced mesh found.\n') + set_hoodconfig(defaultHood, radios) + io.stdout:write('Set defaulthood.\n') + write_molwm(defaultHood,radios) + exit(0) end --Radio less router have mesh lan/wan neigborths