winbind: Fix a memleak
[vlendec/samba-autobuild/.git] / ctdb / tests / scripts / integration_real_cluster.bash
1 # Hey Emacs, this is a -*- shell-script -*- !!!  :-)
2
3 #######################################
4
5 # Enables all of the event scripts used in cluster tests, except for
6 # the mandatory scripts
7 _ctdb_enable_cluster_test_event_scripts ()
8 {
9         local scripts="
10                        06.nfs
11                        10.interface
12                        49.winbind
13                        50.samba
14                        60.nfs
15                       "
16
17         local s
18         for s in $scripts ; do
19                 try_command_on_node all ctdb event script enable legacy "$s"
20         done
21 }
22
23 setup_ctdb ()
24 {
25         _ctdb_enable_cluster_test_event_scripts
26 }
27
28 #######################################
29
30 _service_ctdb ()
31 {
32         cmd="$1"
33
34         if [ -e /etc/redhat-release ] ; then
35                 service ctdb "$cmd"
36         else
37                 /etc/init.d/ctdb "$cmd"
38         fi
39 }
40
41 # Stop/start CTDB on all nodes.  Override for local daemons.
42 ctdb_nodes_stop ()
43 {
44         local nodespec="${1:-all}"
45
46         onnode -p "$nodespec" "$CTDB_TEST_WRAPPER" _service_ctdb stop
47 }
48 ctdb_nodes_start ()
49 {
50         local nodespec="${1:-all}"
51
52         onnode -p "$nodespec" "$CTDB_TEST_WRAPPER" _service_ctdb start
53 }