diff --git a/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh b/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh index f87848e..643d9a8 100755 --- a/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh +++ b/package/kit-busrouter/files/usr/lib/busrouter/telemetry-synology.sh @@ -249,8 +249,7 @@ _ping_iface() { _gw_loss=$(echo "$_gw_out" | sed -n 's/.* \([0-9]*\)% packet loss.*/\1/p') if [ -n "$_gw_loss" ] && [ "$_gw_loss" != "100" ]; then _loss="$_gw_loss" - _avg=$(echo "$_gw_out" | tail -1 | sed -n 's/.*=\ [0-9.]*\/\([0-9.]*\)\/.*/\1/p') - [ -z "$_avg" ] && _avg="null" + _avg="null" # gateway RTT is LAN latency, not meaningful as WAN metric fi fi fi @@ -335,7 +334,7 @@ _detect_carrier() { for _n in 1 2; do _mod=$(_read_file "${AIWANBAL_DIR}/wan${_n}_modem_type" 2>/dev/null) _active=$(_read_file "${AIWANBAL_DIR}/wan${_n}_state" 2>/dev/null) - if [ "$_mod" != "eyeride" ] && [ "$_mod" != "none" ] && [ -n "$_mod" ] && [ "$_active" = "up" ]; then + if [ "$_mod" != "eyeride" ] && [ "$_mod" != "none" ] && [ "$_mod" != "generic" ] && [ -n "$_mod" ] && [ "$_active" = "up" ]; then echo "$_mod"; return fi done