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