diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2015-07-08 10:23:50 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-07-09 08:17:09 -0700 |
commit | be76b0e0b1e58538077daaf444d4f82123823213 (patch) | |
tree | 02aad3670b92493c3a807a6e34cbec14b5e62ff4 /extras | |
parent | 911b4a37a67b6759ddce55e1b3dbcd0641805f76 (diff) |
common-ha: ganesha-ha.sh status tries to read ganesha-ha.conf
status doesn't need to read the config
backport of
> Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd
> BUG: 1241133
> http://review.gluster.org/#/c/11581/
Change-Id: I036fd3072f38958373b1a85b0dc5c97245a72af4
BUG: 1241134
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11582
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras')
-rwxr-xr-x | 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 69794a37db3..c1f07573f42 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 |