From: Martin Schwenke Date: Thu, 14 Jul 2016 02:27:05 +0000 (+1000) Subject: ctdb-scripts: Avoid shellcheck warning SC2155 (declare, assign) X-Git-Tag: tdb-1.3.10~255 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f19f44e0c396a421e9479ef10e2f2ff15fd2e4ec;p=thirdparty%2Fsamba.git ctdb-scripts: Avoid shellcheck warning SC2155 (declare, assign) SC2155: Declare and assign separately to avoid masking return values. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index eb91a365576..635cd0d5b1c 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -197,8 +197,8 @@ get_any_available_node () local all_nodes="$1" # We do a recursive onnode to find which nodes are up and running. - local out=$("$0" -pq all ctdb pnn 2>&1) - local line + local out line + out=$("$0" -pq all ctdb pnn 2>&1) while read line ; do local pnn="${line#PNN:}" if [ "$pnn" != "$line" ] ; then