summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/eventscripts/scripts/49.winbind.sh
blob: bbe1de2a8d76b4d98df8e43af15c91affea549eb (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
setup()
{
	# shellcheck disable=SC2034
	# Used in expected output
	service_name="winbind"

	if [ "$1" != "down" ]; then

		debug "Marking Winbind service as up and managed by CTDB"

		service "winbind" force-started

		export FAKE_WBINFO_FAIL="no"

	else
		debug "Marking Winbind service as down and not managed by CTDB"

		service "winbind" force-stopped

		export FAKE_WBINFO_FAIL="yes"
	fi
}

wbinfo_down()
{
	debug "Making wbinfo commands fail"
	FAKE_WBINFO_FAIL="yes"
}