|
|
cb8e9e |
From f76bbb74e489bc9d34eee082f28ce71b606a3b5d Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
cb8e9e |
Date: Wed, 8 Jul 2015 10:36:04 -0400
|
|
|
cb8e9e |
Subject: [PATCH 219/234] common-ha: ganesha-ha.sh status tries to read ganesha-ha.conf
|
|
|
cb8e9e |
|
|
|
cb8e9e |
status doesn't need to read the config
|
|
|
cb8e9e |
|
|
|
cb8e9e |
backports
|
|
|
cb8e9e |
>> Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd
|
|
|
cb8e9e |
>> BUG: 1241133
|
|
|
cb8e9e |
>> http://review.gluster.org/#/c/11581/
|
|
|
cb8e9e |
> Change-Id: I036fd3072f38958373b1a85b0dc5c97245a72af4
|
|
|
cb8e9e |
> BUG: 1241134
|
|
|
cb8e9e |
> http://review.gluster.org/#/c/11582/
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I001203364cd0b2e1ca4b24edc41b5d043962ba23
|
|
|
cb8e9e |
BUG: 1224610
|
|
|
cb8e9e |
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/52593
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
extras/ganesha/scripts/ganesha-ha.sh | 40 +++++++++++++++++-----------------
|
|
|
cb8e9e |
1 files changed, 20 insertions(+), 20 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
index 69794a3..c1f0757 100755
|
|
|
cb8e9e |
--- a/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
+++ b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
@@ -818,29 +818,29 @@ main()
|
|
|
cb8e9e |
{
|
|
|
cb8e9e |
|
|
|
cb8e9e |
local cmd=${1}; shift
|
|
|
cb8e9e |
- if [[ ${cmd} == *help ]]
|
|
|
cb8e9e |
- then
|
|
|
cb8e9e |
+ if [[ ${cmd} == *help ]]; then
|
|
|
cb8e9e |
usage
|
|
|
cb8e9e |
exit 0
|
|
|
cb8e9e |
fi
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
- HA_CONFDIR=${1}; shift
|
|
|
cb8e9e |
- local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
|
|
|
cb8e9e |
- local node=""
|
|
|
cb8e9e |
- local vip=""
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
- # ignore any comment lines
|
|
|
cb8e9e |
- cfgline=$(grep ^HA_NAME= ${ha_conf})
|
|
|
cb8e9e |
- eval $(echo ${cfgline} | grep -F HA_NAME=)
|
|
|
cb8e9e |
- cfgline=$(grep ^HA_VOL_SERVER= ${ha_conf})
|
|
|
cb8e9e |
- eval $(echo ${cfgline} | grep -F HA_VOL_SERVER=)
|
|
|
cb8e9e |
- cfgline=$(grep ^HA_CLUSTER_NODES= ${ha_conf})
|
|
|
cb8e9e |
- eval $(echo ${cfgline} | grep -F HA_CLUSTER_NODES=)
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
- # we'll pretend that nobody ever edits /etc/os-release
|
|
|
cb8e9e |
- if [ -e /etc/os-release ]; then
|
|
|
cb8e9e |
- eval $(grep -F "REDHAT_SUPPORT_PRODUCT=" /etc/os-release)
|
|
|
cb8e9e |
- [ "$REDHAT_SUPPORT_PRODUCT" == "Fedora" ] && RHEL6_PCS_CNAME_OPTION=""
|
|
|
cb8e9e |
+ if [[ ${cmd} != *status ]]; then
|
|
|
cb8e9e |
+ HA_CONFDIR=${1}; shift
|
|
|
cb8e9e |
+ local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
|
|
|
cb8e9e |
+ local node=""
|
|
|
cb8e9e |
+ local vip=""
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+ # ignore any comment lines
|
|
|
cb8e9e |
+ cfgline=$(grep ^HA_NAME= ${ha_conf})
|
|
|
cb8e9e |
+ eval $(echo ${cfgline} | grep -F HA_NAME=)
|
|
|
cb8e9e |
+ cfgline=$(grep ^HA_VOL_SERVER= ${ha_conf})
|
|
|
cb8e9e |
+ eval $(echo ${cfgline} | grep -F HA_VOL_SERVER=)
|
|
|
cb8e9e |
+ cfgline=$(grep ^HA_CLUSTER_NODES= ${ha_conf})
|
|
|
cb8e9e |
+ eval $(echo ${cfgline} | grep -F HA_CLUSTER_NODES=)
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+ # we'll pretend that nobody ever edits /etc/os-release
|
|
|
cb8e9e |
+ if [ -e /etc/os-release ]; then
|
|
|
cb8e9e |
+ eval $(grep -F "REDHAT_SUPPORT_PRODUCT=" /etc/os-release)
|
|
|
cb8e9e |
+ [ "$REDHAT_SUPPORT_PRODUCT" == "Fedora" ] && RHEL6_PCS_CNAME_OPTION=""
|
|
|
cb8e9e |
+ fi
|
|
|
cb8e9e |
fi
|
|
|
cb8e9e |
|
|
|
cb8e9e |
case "${cmd}" in
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|