Blame SOURCES/bz1751949-2-SAPInstance-improve-profile-detection.patch

734564
From 8eda4725a946ca669df035ed0ffdf053a65e1258 Mon Sep 17 00:00:00 2001
734564
From: Fabian Herschel <fabian.herschel@suse.com>
734564
Date: Thu, 2 Aug 2018 15:36:31 +0200
734564
Subject: [PATCH] SAPInstance: Improved SAP instance profile detection
734564
734564
---
734564
 heartbeat/SAPInstance | 6 +++++-
734564
 1 file changed, 5 insertions(+), 1 deletion(-)
734564
734564
diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance
734564
index 174ea36ef..eb058cccf 100755
734564
--- a/heartbeat/SAPInstance
734564
+++ b/heartbeat/SAPInstance
734564
@@ -371,7 +371,11 @@ sapinstance_init() {
734564
 
734564
   if [ -z "$currentSTART_PROFILE" ]
734564
   then
734564
-    SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}"
734564
+    if [ ! -r "$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}" -a -r "$DIR_PROFILE/${SID}_${InstanceName}_${SAPVIRHOST}" ]; then
734564
+      SAPSTARTPROFILE="$DIR_PROFILE/${SID}_${InstanceName}_${SAPVIRHOST}"
734564
+    else
734564
+      SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}"
734564
+    fi
734564
   else
734564
     SAPSTARTPROFILE="$currentSTART_PROFILE"
734564
   fi