From: Martin Schwenke Date: Wed, 6 Jul 2016 10:43:29 +0000 (+1000) Subject: ctdb-scripts: Avoid shellcheck warning SC2039 (type command) X-Git-Tag: tdb-1.3.10~264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f43df8f0e965902d366ed1e83af57b36614f72d2;p=thirdparty%2Fsamba.git ctdb-scripts: Avoid shellcheck warning SC2039 (type command) SC2039: In POSIX sh, 'type' is not supported. type is commonly supported and is more portable than which(1). Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/events.d/00.ctdb b/ctdb/config/events.d/00.ctdb index 777788b0b75..3649ed001d6 100755 --- a/ctdb/config/events.d/00.ctdb +++ b/ctdb/config/events.d/00.ctdb @@ -12,6 +12,8 @@ loadconfig ############################################################ +# type is commonly supported and more portable than which(1) +# shellcheck disable=SC2039 select_tdb_checker () { # Find the best TDB consistency check available. diff --git a/ctdb/config/events.d/91.lvs b/ctdb/config/events.d/91.lvs index c9722059dde..052b5091e5b 100755 --- a/ctdb/config/events.d/91.lvs +++ b/ctdb/config/events.d/91.lvs @@ -11,6 +11,8 @@ loadconfig ctdb [ -n "$CTDB_LVS_NODES" ] || exit 0 export CTDB_LVS_NODES +# type is commonly supported and more portable than which(1) +# shellcheck disable=SC2039 if ! type ipvsadm >/dev/null 2>&1 ; then echo "LVS configured but ipvsadm not found" exit 0 diff --git a/ctdb/config/functions b/ctdb/config/functions index 2768d3f0487..be308e7b3a2 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -1137,6 +1137,8 @@ iptables_wrapper () } # AIX (and perhaps others?) doesn't have mktemp +# type is commonly supported and more portable than which(1) +# shellcheck disable=SC2039 if ! type mktemp >/dev/null 2>&1 ; then mktemp () {