mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
e081cafc9c
Enable required event scripts to manage services. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
40 lines
716 B
Bash
Executable File
40 lines
716 B
Bash
Executable File
#!/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"
|
|
|
|
case "$1" in
|
|
takeip)
|
|
nfs_callout_pre "$@"
|
|
;;
|
|
|
|
releaseip)
|
|
nfs_callout_pre "$@"
|
|
;;
|
|
esac
|