From 7b48dc32005708ca27c383db5c7319597707fd67 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 1 Mar 2022 22:18:11 -0800 Subject: [PATCH] Only one device name per interface name (some devices have 2) --- files/usr/lib/lua/aredn/hardware.lua | 2 +- files/usr/local/bin/node-setup | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/usr/lib/lua/aredn/hardware.lua b/files/usr/lib/lua/aredn/hardware.lua index 148e06cc..d0f8c7ac 100644 --- a/files/usr/lib/lua/aredn/hardware.lua +++ b/files/usr/lib/lua/aredn/hardware.lua @@ -144,7 +144,7 @@ function hardware.get_iface_name(name) return "eth0.2" end -- Maybe the board knows - return hardware.get_board().network[name].ifname + return hardware.get_board().network[name].ifname:match("^(%S+)") end function hardware.get_link_led() diff --git a/files/usr/local/bin/node-setup b/files/usr/local/bin/node-setup index 48222370..538274ff 100755 --- a/files/usr/local/bin/node-setup +++ b/files/usr/local/bin/node-setup @@ -81,7 +81,7 @@ if not (config == "mesh" and nixio.fs.access("/etc/config.mesh/_setup", "r")) th return -1 end -local lanintf = aredn.hardware.get_board().network.lan.ifname +local lanintf = aredn.hardware.get_board().network.lan.ifname:match("^(%S+)") local node = aredn_info.get_nvram("node") local tactical = aredn_info.get_nvram("tactical") local mac2 = mac_to_ip(aredn.hardware.get_interface_mac(aredn.hardware.get_iface_name("wifi")), 0)