Blame SOURCES/bz1299404-galera-custom-host-port.patch

4efcdb
From cbccff5ed9b1fc5641063f05ad531f897d366fa4 Mon Sep 17 00:00:00 2001
4efcdb
From: Mike Bayer <mike_mp@zzzcomputing.com>
4efcdb
Date: Tue, 15 Sep 2015 14:54:05 -0400
4efcdb
Subject: [PATCH] galera: add support for MYSQL_HOST and MYSQL_PORT from
4efcdb
 clustercheck
4efcdb
4efcdb
---
4efcdb
 heartbeat/galera | 12 ++++++++++++
4efcdb
 1 file changed, 12 insertions(+)
4efcdb
4efcdb
diff --git a/heartbeat/galera b/heartbeat/galera
4efcdb
index 920507b..1a1a4ce 100755
4efcdb
--- a/heartbeat/galera
4efcdb
+++ b/heartbeat/galera
4efcdb
@@ -704,6 +704,18 @@ if [ -n "${OCF_RESKEY_check_passwd}" ]; then
4efcdb
     MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK --password=${OCF_RESKEY_check_passwd}"
4efcdb
 fi
4efcdb
 
4efcdb
+# This value is automatically sourced from /etc/sysconfig/checkcluster if available
4efcdb
+if [ -n "${MYSQL_HOST}" ]; then
4efcdb
+    MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK -h ${MYSQL_HOST}"
4efcdb
+fi
4efcdb
+
4efcdb
+# This value is automatically sourced from /etc/sysconfig/checkcluster if available
4efcdb
+if [ -n "${MYSQL_PORT}" ]; then
4efcdb
+    MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK -P ${MYSQL_PORT}"
4efcdb
+fi
4efcdb
+
4efcdb
+
4efcdb
+
4efcdb
 # What kind of method was invoked?
4efcdb
 case "$1" in
4efcdb
   start)    galera_start;;