diff options
author | Martin Schwenke <martin@meltin.net> | 2016-07-06 20:43:29 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-07-21 02:24:26 +0200 |
commit | f43df8f0e965902d366ed1e83af57b36614f72d2 (patch) | |
tree | 8a066db599addc52dc53758bbc659282b907921a | |
parent | b0c1dbfb8f2bd2743b21a6a77343b2a7940958ce (diff) | |
download | samba-f43df8f0e965902d366ed1e83af57b36614f72d2.tar.gz |
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | ctdb/config/events.d/00.ctdb | 2 | ||||
-rwxr-xr-x | ctdb/config/events.d/91.lvs | 2 | ||||
-rwxr-xr-x | ctdb/config/functions | 2 |
3 files changed, 6 insertions, 0 deletions
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 () { |