File 0008-adjusting-sapdb.sh-to-work-with-HANA-Multi-Tenant-Da.patch of Package resource-agents.5203
From c36eeff2ff18ce9e2bccb339c7e4ddb11a5883fd Mon Sep 17 00:00:00 2001
From: Gabriel Cavalcante <gabriel@elabsis.com>
Date: Thu, 13 Oct 2016 00:16:34 -0300
Subject: [PATCH 08/12] adjusting sapdb.sh to work with HANA Multi-Tenant
Databases
---
heartbeat/sapdb.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/heartbeat/sapdb.sh b/heartbeat/sapdb.sh
index 8661f26..03474fc 100755
--- a/heartbeat/sapdb.sh
+++ b/heartbeat/sapdb.sh
@@ -229,7 +229,7 @@ sapdatabase_monitor() {
# we have to parse the output, because the returncode doesn't tell anything about the instance status
for SERVICE in `echo "$output" | grep -i 'Component[ ]*Name *[:=] [A-Za-z][A-Za-z0-9_]* (' | sed 's/^.*Component[ ]*Name *[:=] *\([A-Za-z][A-Za-z0-9_]*\).*$/\1/i'`
do
- COLOR=`echo "$output" | grep -i "Component[ ]*Name *[:=] *$SERVICE (" | sed 's/^.*Status *[:=] *\([A-Za-z][A-Za-z0-9_]*\).*$/\1/i'`
+ COLOR=`echo "$output" | grep -i "Component[ ]*Name *[:=] *$SERVICE (" | sed 's/^.*Status *[:=] *\([A-Za-z][A-Za-z0-9_]*\).*$/\1/i' | uniq`
STATE=0
case $COLOR in
--
2.10.1