diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2015-07-08 10:14:40 -0400 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-07-09 08:01:37 -0700 |
commit | ea7161bca1c9e0c91148fea8895041a08ed24830 (patch) | |
tree | 15b0f320aad0f89e12fadc859dacd2e96ce554df /extras | |
parent | 41266ec75d729c53ab748aa2ac1fa0d0515b97d6 (diff) |
common-ha: ganesha-ha.sh status tries to read ganesha-ha.conf
status doesn't need to read the config
Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd
BUG: 1241133
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11581
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
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 |