From 2d6e2cfdfdf4397104ec501aa147063cfb6fcee0 Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Thu, 17 Mar 2022 19:59:41 +0100 Subject: [PATCH] Check for configured interfaces --- lagdetect.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lagdetect.sh b/lagdetect.sh index b07bbb2..bca7ffa 100755 --- a/lagdetect.sh +++ b/lagdetect.sh @@ -156,6 +156,16 @@ do done +for i in "${IFACE_RX}" "${IFACE_TX}" +do + if ip link show "${i}" >/dev/null + then + printf 'FATAL: Interface "%s" seems bogus\n' "${i}" + exit 1 + fi +done + + set -u -- 2.39.5