From 7f7ca75100a846242ff1510fd9bcf299cd3d00eb Mon Sep 17 00:00:00 2001 From: Aleksei Burlakov Date: Mon, 26 Oct 2020 13:25:45 +0100 Subject: [PATCH] ethmonitor: is_interface: RE matches vlan names Vlan names end not with : but are suffixed with the @devices-name --- heartbeat/ethmonitor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heartbeat/ethmonitor b/heartbeat/ethmonitor index e791fbe9d..cf0321ab4 100755 --- a/heartbeat/ethmonitor +++ b/heartbeat/ethmonitor @@ -230,8 +230,8 @@ is_interface() { # # List interfaces but exclude FreeS/WAN ipsecN virtual interfaces # - local iface=`$IP2UTIL -o -f inet addr show | grep " $1 " \ - | cut -d ' ' -f2 | sort -u | grep -v '^ipsec[0-9][0-9]*$'` + local iface=`$IP2UTIL -o -f link addr show | grep -e " $1[:@]" \ + | cut -d ' ' -f2 | tr -d ':' | cut -d '@' -f1 | sort -u | grep -v '^ipsec[0-9][0-9]*$'` [ "$iface" != "" ] }