Blame SOURCES/bz1891883-ethmonitor-vlan-fix.patch

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