]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Drop use of eval in CTDB callout handling
authorMartin Schwenke <martin@meltin.net>
Fri, 27 May 2022 13:19:46 +0000 (23:19 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 24 Jun 2022 10:40:50 +0000 (10:40 +0000)
eval is not required and causes the follow ShellCheck warning:

  SC2294 (warning): eval negates the benefit of arrays. Drop eval to
  preserve whitespace/symbols (or eval as string).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jun 24 10:40:50 UTC 2022 on sn-devel-184

ctdb/config/functions

index a4e73ad05943be161334572366bc5b8b1d3c1ec1..82ed0957aa0c7753f76d471700011f83fddc624c 100755 (executable)
@@ -920,7 +920,7 @@ nfs_callout_register ()
 
     echo "$CTDB_NFS_CALLOUT" >"$nfs_callout_cache_callout"
 
-    _t=$(eval "$CTDB_NFS_CALLOUT" "register")
+    _t=$("$CTDB_NFS_CALLOUT" "register")
     if [ -n "$_t" ] ; then
        echo "$_t" |
            while IFS="" read _op ; do
@@ -945,7 +945,7 @@ nfs_callout ()
     # Run the operation if it is registered...
     if [ -e "${nfs_callout_cache_ops}/${1}" ] || \
           [ -e "${nfs_callout_cache_ops}/ALL" ]; then
-       eval "$CTDB_NFS_CALLOUT" "$@"
+       "$CTDB_NFS_CALLOUT" "$@"
     fi
 }