From: Martin Schwenke Date: Fri, 23 Feb 2018 01:05:14 +0000 (+1100) Subject: ctdb-tests: Add some options to setup_ctdb() X-Git-Tag: talloc-2.1.12~124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdfc8b7e3efd813ab2e4daa50a2ef9abeb844eef;p=thirdparty%2Fsamba.git ctdb-tests: Add some options to setup_ctdb() These provide special-purpose setups for particular testcases. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash index b9b6232bbe8..09898707e03 100644 --- a/ctdb/tests/simple/scripts/local_daemons.bash +++ b/ctdb/tests/simple/scripts/local_daemons.bash @@ -134,6 +134,13 @@ setup_public_addresses () setup_ctdb () { + local no_public_addresses=false + local no_event_scripts=false + case "$1" in + --no-public-addresses) no_public_addresses=true ;; + --no-event-scripts) no_event_scripts=true ;; + esac + setup_nodes >"$CTDB_NODES" || return 1 # If there are (strictly) greater than 2 nodes then we'll @@ -159,7 +166,7 @@ setup_ctdb () local public_addresses="${node_dir}/public_addresses" - if [ $pnn_no_ips -eq $pnn ] ; then + if $no_public_addresses || [ $pnn_no_ips -eq $pnn ] ; then echo "Node ${pnn} will have no public IPs." : >"$public_addresses" else @@ -173,6 +180,10 @@ setup_ctdb () local db_dir="${node_dir}/db" mkdir -p "${db_dir}/persistent" + if $no_event_scripts ; then + rm -vf "${CTDB_BASE}/events.d/"* + fi + cat >"$conf" <