Remove trailing .0 from iw reported frequency

Signed-off-by: Zehka <git@zehka.net>
This commit is contained in:
Zehka 2024-01-16 00:32:56 +01:00
parent 9790d3117b
commit 34e326f303
1 changed files with 1 additions and 1 deletions

View File

@ -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)"