Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
--- /dev/null
+#!/bin/bash
+
+test_info()
+{
+ cat <<EOF
+Restart the ctdbd daemons of a CTDB cluster.
+
+Ensure that event script reequired for cluster tests are enabled.
+EOF
+}
+
+. "${TEST_SCRIPTS_DIR}/integration.bash"
+
+ctdb_test_init "$@"
+
+set -e
+
+ctdb_test_check_real_cluster
+
+ctdb_stop_all >/dev/null 2>&1 || true
+
+ctdb_enable_cluster_test_event_scripts
+
+ctdb_start_all
#######################################
+# Enables all of the event scripts used in cluster tests, except for
+# the mandatory scripts
+ctdb_enable_cluster_test_event_scripts ()
+{
+ local scripts="
+ 06.nfs
+ 10.interface
+ 49.winbind
+ 50.samba
+ 60.nfs
+ "
+
+ local s
+ for s in $scripts ; do
+ try_command_on_node all ctdb event script enable legacy "$s"
+ done
+}
+
+########################################
+
# Make sure that $CTDB is set.
: ${CTDB:=ctdb}
ctdb_stop_all >/dev/null 2>&1 || true
+if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
+ ctdb_enable_cluster_test_event_scripts
+fi
+
setup_ctdb
ctdb_start_all