]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Avoid shellcheck warning SC2039 (type command)
authorMartin Schwenke <martin@meltin.net>
Wed, 6 Jul 2016 10:43:29 +0000 (20:43 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Jul 2016 00:24:26 +0000 (02:24 +0200)
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>
ctdb/config/events.d/00.ctdb
ctdb/config/events.d/91.lvs
ctdb/config/functions

index 777788b0b75a1b8a9fe3c49417448ffa950b1790..3649ed001d69334cf5df54a85815c0c087c42a44 100755 (executable)
@@ -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.
index c9722059dde37cfdba04dc4bed12c7426941add9..052b5091e5b0242d5fe2d467b1f83adfdf365e85 100755 (executable)
@@ -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
index 2768d3f048701fc8a612046e1ddc22ead7a9151f..be308e7b3a2f14ce09732b6d5381548d79cfe06e 100755 (executable)
@@ -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 ()
     {