summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/etc-ctdb/events/legacy/00.test.script
blob: c6797da28d772f6e986f103f59c595d96dd996c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# event script for 'make test'

. "${CTDB_BASE}/functions"

load_script_options

ctdb_check_args "$@"

event="$1"
shift

case "$event" in
monitor)
	if [ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] ; then
		timeout=9999
		echo "Sleeping for ${timeout} seconds..."
		sleep $timeout
	fi
	;;

startup)
	ifaces=$(ctdb ifaces -X | tail -n +2 | cut -d '|' -f2)
	for i in $ifaces; do
		ctdb setifacelink "$i" up
	done
	;;
esac

echo "${event} event${*:+ for }$*"