From: Martin Schwenke Date: Wed, 11 Dec 2019 22:43:58 +0000 (+1100) Subject: ctdb-tests: Fix handling of --no-event-scripts option X-Git-Tag: ldb-2.1.1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=224e8978723bd469c2da772208a17725e868fbef;p=thirdparty%2Fsamba.git ctdb-tests: Fix handling of --no-event-scripts option Shellcheck noticed that pnn was never referenced. Not sure this ever worked or whether it got broken somewhere along the way. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/scripts/integration_local_daemons.bash b/ctdb/tests/scripts/integration_local_daemons.bash index 422f2941823..9850ad2208c 100644 --- a/ctdb/tests/scripts/integration_local_daemons.bash +++ b/ctdb/tests/scripts/integration_local_daemons.bash @@ -34,10 +34,10 @@ setup_ctdb () fi if $no_event_scripts ; then - local pnn - for pnn in $(seq 0 $((CTDB_TEST_LOCAL_DAEMONS - 1))) ; do - rm -vf "${CTDB_BASE}/events/legacy/"* - done + # Want CTDB_BASE expanded when executed under onnode + # shellcheck disable=SC2016 + $ctdb_local_daemons onnode -q all \ + 'rm "${CTDB_BASE}/events/legacy/"*' fi if $CTDB_TEST_PRINT_LOGS_ON_ERROR ; then