Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 5223ef1957e1a349aaa03029f036f2bd > files > 9

ctdb-4.6.12-1.1.mga6.armv7hl.rpm

#!/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 is used by various functions
# shellcheck disable=SC2034
service_name="nfs"

loadconfig
service_state_dir=$(ctdb_setup_service_state_dir) || exit $?

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

nfs_callout_pre ()
{
	_event="$1"
	shift

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

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

nfs_callout_init "$service_state_dir"

ctdb_start_stop_service

is_ctdb_managed_service || exit 0

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

releaseip)
	nfs_callout_pre "$@"
	;;
esac