Skip to content

Commit

Permalink
Fix: cibsecret: don't use pssh -q option unless supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaillot committed Jun 15, 2020
1 parent 8b9dcbf commit ac89c66
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/cibsecret.in
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ check_env() {
if which pssh >/dev/null 2>&1; then
rsh=pssh_fun
rcp_to_from=pscp_fun

# -q is a SUSE patch not present in upstream pssh
PSSH_QUIET_OPTION=""
pssh -q 2>&1|grep "no such option: -q" > /dev/null ||
PSSH_QUIET_OPTION="-q"
elif which pdsh >/dev/null 2>&1; then
rsh=pdsh_fun
rcp_to_from=pdcp_fun
Expand Down Expand Up @@ -190,13 +195,13 @@ get_live_nodes() {
}

pssh_fun() {
pssh -qi -H "$LIVE_NODES" -x "$SSH_OPTS" -- "$@"
pssh $PSSH_QUIET_OPTION -i -H "$LIVE_NODES" -x "$SSH_OPTS" -- "$@"
}

pscp_fun() {
PSCP_DEST="$1"
shift
pscp -q -H "$LIVE_NODES" -x "-pr" -x "$SSH_OPTS" -- "$@" "$PSCP_DEST"
pscp $PSSH_QUIET_OPTION -H "$LIVE_NODES" -x "-pr" -x "$SSH_OPTS" -- "$@" "$PSCP_DEST"
}

pdsh_fun() {
Expand Down

0 comments on commit ac89c66

Please sign in to comment.