diff --git a/tools/cibsecret.in b/tools/cibsecret.in index dabbfc0..568833c 100644 --- a/tools/cibsecret.in +++ b/tools/cibsecret.in @@ -163,8 +163,14 @@ check_env() { # This must be called (and return success) before calling $rsh or $rcp_to_from get_live_peers() { + # Get local node name + GLP_LOCAL_NODE="$(crm_node -n)" + [ $? -eq 0 ] || fatal "couldn't get local node name" + # Get a list of all other cluster nodes - GLN_ALL_NODES="$(crm_node -l | awk '{print $2}' | grep -v "$(uname -n)")" + GLP_ALL_PEERS="$(crm_node -l)" + [ $? -eq 0 ] || fatal "couldn't determine cluster nodes" + GLP_ALL_PEERS="$(echo "$GLP_ALL_PEERS" | awk '{print $2}' | grep -v "^${GLP_LOCAL_NODE}$")" # Make a list of those that respond to pings if [ "$(id -u)" = "0" ] && which fping >/dev/null 2>&1; then