]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Fix handling of --no-event-scripts option
authorMartin Schwenke <martin@meltin.net>
Wed, 11 Dec 2019 22:43:58 +0000 (09:43 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 12 Feb 2020 03:11:39 +0000 (03:11 +0000)
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/scripts/integration_local_daemons.bash

index 422f294182392ee5d7c7f11bf8bb5adf6152c21e..9850ad2208cf1def4b81499a6e3172b2e3a35665 100644 (file)
@@ -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