Merge pull request #8031 from dibdot/travelmate
travelmate: bugfix 1.3.4
This commit is contained in:
commit
fd7cad216f
2 changed files with 13 additions and 10 deletions
net/travelmate
|
@ -6,7 +6,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=travelmate
|
PKG_NAME:=travelmate
|
||||||
PKG_VERSION:=1.3.3
|
PKG_VERSION:=1.3.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=GPL-3.0+
|
PKG_LICENSE:=GPL-3.0+
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
trm_ver="1.3.3"
|
trm_ver="1.3.4"
|
||||||
trm_sysver="unknown"
|
trm_sysver="unknown"
|
||||||
trm_enabled=0
|
trm_enabled=0
|
||||||
trm_debug=0
|
trm_debug=0
|
||||||
|
@ -108,7 +108,7 @@ f_prep()
|
||||||
local disabled="$(uci_get wireless "${config}" disabled)"
|
local disabled="$(uci_get wireless "${config}" disabled)"
|
||||||
local eaptype="$(uci_get wireless "${config}" eap_type)"
|
local eaptype="$(uci_get wireless "${config}" eap_type)"
|
||||||
|
|
||||||
if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
|
if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
|
||||||
then
|
then
|
||||||
trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
|
trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
|
||||||
elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
|
elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
|
||||||
|
@ -168,7 +168,7 @@ f_check()
|
||||||
for radio in ${trm_radiolist}
|
for radio in ${trm_radiolist}
|
||||||
do
|
do
|
||||||
result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
|
result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
|
||||||
if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
|
if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo "${radio}")" ]
|
||||||
then
|
then
|
||||||
trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
|
trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
|
||||||
fi
|
fi
|
||||||
|
@ -300,7 +300,7 @@ f_log()
|
||||||
f_main()
|
f_main()
|
||||||
{
|
{
|
||||||
local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
|
local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
|
||||||
local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio active_prio
|
local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
|
||||||
|
|
||||||
f_check "initial"
|
f_check "initial"
|
||||||
f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
|
f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
|
||||||
|
@ -347,12 +347,10 @@ f_main()
|
||||||
f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
|
f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if ([ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]) || \
|
if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
|
||||||
([ "${dev}" != "${active_radio}" ] && [ "${active_prio}" = "true" ])
|
|
||||||
then
|
then
|
||||||
active_prio="true"
|
f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
|
||||||
f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - continue"
|
break 3
|
||||||
continue 3
|
|
||||||
fi
|
fi
|
||||||
if [ -z "${scan_list}" ]
|
if [ -z "${scan_list}" ]
|
||||||
then
|
then
|
||||||
|
@ -361,6 +359,11 @@ f_main()
|
||||||
if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
|
if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
|
||||||
sort -rn | awk '{ORS=",";print $0}')")"
|
sort -rn | awk '{ORS=",";print $0}')")"
|
||||||
f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
|
f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
|
||||||
|
if [ -z "${scan_list}" ]
|
||||||
|
then
|
||||||
|
f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
|
||||||
|
continue 3
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
IFS=","
|
IFS=","
|
||||||
for scan in ${scan_list}
|
for scan in ${scan_list}
|
||||||
|
|
Loading…
Reference in a new issue