From 80ba66013efeec2f2df8429321a8630ef7780a8f Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 27 May 2022 23:19:46 +1000 Subject: [PATCH] ctdb-scripts: Drop use of eval in CTDB callout handling 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 Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jun 24 10:40:50 UTC 2022 on sn-devel-184 --- ctdb/config/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index a4e73ad0594..82ed0957aa0 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -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 }