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

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