From ac89c661c552a067ee1894ee42ccf526667c94c7 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 15 Jun 2020 12:03:22 -0500 Subject: [PATCH] Fix: cibsecret: don't use pssh -q option unless supported --- tools/cibsecret.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/cibsecret.in b/tools/cibsecret.in index 36e08201fd7..9b74ba331a1 100644 --- a/tools/cibsecret.in +++ b/tools/cibsecret.in @@ -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 @@ -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() {