Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tecff-autoupdater-wifi-fallback/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=tecff-autoupdater-wifi-fallback
PKG_VERSION:=6
PKG_VERSION:=7

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS := respondd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ uci:save('autoupdater-wifi-fallback')
uci:save('network')
uci:save('firewall')

local minute = tonumber(util.readfile('/usr/lib/micron.d/autoupdater'):match('^([0-9][0-9]?)%s'))
local content = util.readfile('/usr/lib/micron.d/autoupdater')
local minute = content and tonumber(content:match('^([0-9][0-9]?)%s')) or 0
minute = (minute + 10) % 60

local f = io.open('/usr/lib/micron.d/autoupdater-wifi-fallback', 'w')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ function M.get_available_wifi_networks()

for radio, _ in pairs(radios) do
local wifitype = iwinfo.type(radio)
local iw = iwinfo[wifitype]
if not iw then
return null
end
local tmplist = iw.scanlist(radio)
for _, net in ipairs(tmplist) do
if net.ssid and net.bssid and net.ssid:match('.*[Ff][Rr][Ee][Ii][Ff][Uu][Nn][Kk].*') then
table.insert (radios[radio], net)
local iw = wifitype and iwinfo[wifitype]
if iw then
local tmplist = iw.scanlist(radio)
if tmplist then
for _, net in ipairs(tmplist) do
if net.ssid and net.bssid and net.ssid:match('.*[Ff][Rr][Ee][Ii][Ff][Uu][Nn][Kk].*') then
table.insert (radios[radio], net)
end
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ end

local function run_autoupdater()
autil.log('out', 'executing the autoupdater...')
os.execute('/usr/sbin/autoupdater -f -b ' .. branch_name)
return os.execute('/usr/sbin/autoupdater -f -b ' .. branch_name)
end
Comment on lines 92 to 95

local function switch_to_fallback_mode(radio, ssid, bssid)
Expand Down
2 changes: 1 addition & 1 deletion tecff-ssid-changer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=tecff-ssid-changer
PKG_VERSION:=2
PKG_RELEASE:=0
PKG_RELEASE:=6

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ fi
# check for an active gateway and get its connection quality (TQ)
GATEWAY_TQ=0
if [ -f /var/gluon/state/has_default_gw4 ]; then
GATEWAY_TQ="$(batctl gwl -H | grep -e "^\*" | awk -F'[()]' '{print $2}' | tr -d " ")"
GATEWAY_TQ="$(batctl gwl -H 2>/dev/null | grep -e "^\*" | awk -F'[()]' '{print $2}' | tr -d " ")"
# Fallback if default gateway exists but no batman gateway is selected (node is offline for clients)
if [ -z "$GATEWAY_TQ" ]; then
GATEWAY_TQ=0
fi
fi

HUP_NEEDED=false
Expand Down