diff options
Diffstat (limited to 'extras')
| -rw-r--r-- | extras/ganesha/scripts/ganesha-ha.sh | 27 | 
1 files changed, 26 insertions, 1 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 37b90e4718a..42e28cf5788 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -854,6 +854,29 @@ setup_state_volume()  } +status() +{ +    local regex_str="^ ${1}"; shift +    local status_file=$(mktemp) + +    while [[ ${1} ]]; do + +        regex_str="${regex_str}|^ ${1}" + +        shift +    done + +    pcs status | egrep "^Online:" > ${status_file} + +    echo >> ${status_file} + +    pcs status | egrep "${regex_str}" | sed -e "s/\t/ /" | cut -d ' ' -f 2,4 >> ${status_file} + +    cat ${status_file} + +    rm -f ${status_file} +} +  main()  { @@ -987,7 +1010,9 @@ $HA_CONFDIR/ganesha-ha.conf          ;;      status | --status) -        exec pcs status +        determine_servers "status" + +        status ${HA_SERVERS}          ;;      refresh-config | --refresh-config)  | 
