From: Martin Schwenke Date: Thu, 14 Jul 2016 02:58:31 +0000 (+1000) Subject: ctdb-scripts: Avoid shellcheck warning SC2006 (legacy `..`) X-Git-Tag: tdb-1.3.10~253 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=355c49fc7469d7a82e507c87250a60d490d112ac;p=thirdparty%2Fsamba.git ctdb-scripts: Avoid shellcheck warning SC2006 (legacy `..`) SC2006: Use $(..) instead of legacy `..`. Make the obvious changes to $(...) but convert some to $((...)). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tools/ctdb_diagnostics b/ctdb/tools/ctdb_diagnostics index 0a428516f59..e72c23f3998 100755 --- a/ctdb/tools/ctdb_diagnostics +++ b/ctdb/tools/ctdb_diagnostics @@ -96,7 +96,7 @@ date error() { msg="$1" echo "ERROR: $msg" - NUM_ERRORS=`expr $NUM_ERRORS + 1` + NUM_ERRORS=$((NUM_ERRORS + 1)) echo " ERROR[$NUM_ERRORS]: $msg" >> "$ERRORS" } @@ -137,9 +137,10 @@ show_and_compare_files () { fstf="${tmpdir}/${_bf}.node${n}" onnode "$n" cat "$f" >"$fstf" 2>&1 + _fdetails=$(onnode "$n" ls -l "$f" 2>&1) echo " ================================" echo " File (on node $n): $f" - echo " `onnode $n ls -l $f 2>&1`" + echo " $_fdetails" sed 's/^/ /' "$fstf" echo " ================================" first=false @@ -210,10 +211,10 @@ cat < /dev/null` +WORKGROUP=$(testparm -s --parameter-name=WORKGROUP 2> /dev/null) show_all id "$WORKGROUP/Administrator" show_all "wbinfo -p" show_all "wbinfo --online-status"