From 0c4b507dc9024a52ea320bfc6ba769a0ecbe4a46 Mon Sep 17 00:00:00 2001 From: Grische <2787581+grische@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:28:55 +0200 Subject: [PATCH] ffmuc-mesh-vpn-wireguard: fix for older nslookup Older versions of nslookup use a different format --- .../files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink b/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink index 2b533da6..296f8021 100755 --- a/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink +++ b/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink @@ -222,7 +222,8 @@ NTP_SERVERS_ADDRS="" set -o pipefail # Enable pipefail: this script does not fully support pipefail yet, but required below for NTP_SERVER in $NTP_SERVERS; do - all_ntp_ips="$(gluon-wan nslookup "$NTP_SERVER" | grep '^Address:\? ' | sed 's/^Address:\? //')" + # older versions of nslookup use "Address 1:" with increasing numbers, newer just use "Address:" + all_ntp_ips="$(gluon-wan nslookup "$NTP_SERVER" | grep '^Address \?[0-9]*:\? ' | sed 's/^Address \?[0-9]*:\? //')" if ip -6 route show table 1 | grep -q 'default via' then # We need to match a few special cases for IPv6 here: