File 0001-ethmonitor-is_interface-RE-matches-vlan-names.patch of Package resource-agents.20909
From 7f7ca75100a846242ff1510fd9bcf299cd3d00eb Mon Sep 17 00:00:00 2001
From: Aleksei Burlakov <aleksei.burlakov@suse.com>
Date: Mon, 26 Oct 2020 13:25:45 +0100
Subject: [PATCH 1/1] 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 e791fbe9..cf0321ab 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 link addr show | grep " $1:" \
- | cut -d ' ' -f2 | tr -d ':' | 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" != "" ]
}
--
2.26.2