From: Martin Schwenke Date: Tue, 12 Jul 2016 03:27:08 +0000 (+1000) Subject: ctdb-scripts: Avoid shellcheck warning SC2038 (find without -print0) X-Git-Tag: tdb-1.3.10~259 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e9aa57c05da9c22ecb5cecd97ea37693b921ba4;p=thirdparty%2Fsamba.git ctdb-scripts: Avoid shellcheck warning SC2038 (find without -print0) SC2038: Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. The suggested options aren't POSIX-compliant. This is more portable. Base filenames can't have whitespace so rework to avoid problems with whitespace in directory name. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/functions b/ctdb/config/functions index 3b9d1dbbfa2..c9fe207167b 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -1290,7 +1290,9 @@ update_tickles () rm -f "$_my_connections" "$_my_tickles" # Remove stale files from killed scripts - find "$tickledir" -type f -mmin +10 | xargs -r rm + # Files can't have spaces in name, more portable than -print0/-0 + # shellcheck disable=SC2038 + (cd "$tickledir" && find . -type f -mmin +10 | xargs -r rm) } ########################################################