summaryrefslogtreecommitdiff
path: root/ctdb/config/events/legacy/06.nfs
blob: 4e029065ab06caa8c712016d749df9c9466a81bb (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
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# script to manage nfs in a clustered environment

[ -n "$CTDB_BASE" ] || \
    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")

. "${CTDB_BASE}/functions"

service_name="nfs"

load_script_options "service" "60.nfs"

ctdb_setup_state_dir "service" "$service_name"

######################################################################

nfs_callout_pre ()
{
	_event="$1"
	shift

	nfs_callout "${_event}-pre" "$@"
}

######################################################################

# script_state_dir set by ctdb_setup_state_dir()
# shellcheck disable=SC2154
nfs_callout_init "$script_state_dir"

[ "$CTDB_MANAGES_NFS" = "yes" ] || exit 0

case "$1" in
takeip)
	nfs_callout_pre "$@"
	;;

releaseip)
	nfs_callout_pre "$@"
	;;
esac