Blame SOURCES/bz1908148-openstack-info-fix-bashism.patch

f065e8
From 8b1d3257e5176a2f50a843a21888c4b4f51f370b Mon Sep 17 00:00:00 2001
f065e8
From: Valentin Vidic <vvidic@valentin-vidic.from.hr>
f065e8
Date: Sun, 3 Apr 2022 20:31:50 +0200
f065e8
Subject: [PATCH] openstack-info: fix bashism
f065e8
f065e8
Also simplify striping of trailing comma.
f065e8
---
f065e8
 heartbeat/openstack-info.in | 4 ++--
f065e8
 1 file changed, 2 insertions(+), 2 deletions(-)
f065e8
f065e8
diff --git a/heartbeat/openstack-info.in b/heartbeat/openstack-info.in
f065e8
index f6dc1ee4d..f3a59fc7a 100755
f065e8
--- a/heartbeat/openstack-info.in
f065e8
+++ b/heartbeat/openstack-info.in
f065e8
@@ -167,9 +167,9 @@ OSInfoStats() {
f065e8
 			--column fixed_ips \
f065e8
 			${port_id} | grep -P '\"subnet_id\": \".*\",$' |
f065e8
 			grep -P -o '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}')
f065e8
-		value+="${subnet_id}:${port_id},"
f065e8
+		value="${value}${subnet_id}:${port_id},"
f065e8
 	done
f065e8
-	value=$(echo ${value} | sed -e 's/,$//g')
f065e8
+	value=${value%,}
f065e8
 
f065e8
 	${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n openstack_ports -v "$value"
f065e8