From 34e326f30365d1785804545b08e463d796cf6269 Mon Sep 17 00:00:00 2001 From: Zehka Date: Tue, 16 Jan 2024 00:32:56 +0100 Subject: [PATCH] Remove trailing .0 from iw reported frequency Signed-off-by: Zehka --- lnxrouter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnxrouter b/lnxrouter index 3a3663f..e17e31f 100755 --- a/lnxrouter +++ b/lnxrouter @@ -1700,7 +1700,7 @@ prepare_wifi_interface() { # TODO move this to check_wifi_settings() ? if is_interface_wifi_connected "${WIFI_IFACE}"; then - WIFI_IFACE_FREQ=$(iw dev "${WIFI_IFACE}" link | grep -i freq | awk '{print $2}') + WIFI_IFACE_FREQ=$(iw dev "${WIFI_IFACE}" link | grep -i freq | awk '{print $2}' | sed 's/\.00*//g') WIFI_IFACE_CHANNEL=$(ieee80211_frequency_to_channel "${WIFI_IFACE_FREQ}") echo "${WIFI_IFACE} already working in channel ${WIFI_IFACE_CHANNEL} (${WIFI_IFACE_FREQ} MHz)"