ctdb_set_pnn
setup_date "1234567890"
- export NFS_HOSTNAME
+ export FAKE_NFS_HOSTNAME="cluster1"
}
ctdb_catdb_format_pairs()
while read -r _ _sip _; do
for _cip; do
cat <<EOF
-SM_NOTIFY: ${_sip} -> ${_cip}, MON_NAME=${NFS_HOSTNAME}, STATE=${_state}
+SM_NOTIFY: ${_sip} -> ${_cip}, MON_NAME=${FAKE_NFS_HOSTNAME}, STATE=${_state}
EOF
done
done | {
while IFS="" read -r file ; do
read -r _ _ _ _ _ cip sip <"$file"
cat <<EOF
-SM_NOTIFY: ${sip} -> ${cip}, MON_NAME=${NFS_HOSTNAME}, STATE=${state}
+SM_NOTIFY: ${sip} -> ${cip}, MON_NAME=${FAKE_NFS_HOSTNAME}, STATE=${state}
EOF
done
# Older Linux versions may use something like the following...
#
# /etc/sysconfig/nfs (Red Hat) or /etc/default/nfs-common (Debian):
-# NFS_HOSTNAME=mycluster
-# STATD_HOSTNAME="${NFS_HOSTNAME} -H /usr/local/libexec/ctdb/statd_callout"
+# STATD_HOSTNAME="mycluster -H /usr/local/libexec/ctdb/statd_callout"
#
# If using Linux kernel NFS then the following should also be set in
# /etc/nfs.conf:
exit 1
}
-# Try different variables to find config file for NFS_HOSTNAME
-load_system_config "nfs" "nfs-common"
-
-# If NFS_HOSTNAME not set then try to pull it out of /etc/nfs.conf
-if [ -z "$NFS_HOSTNAME" ]; then
- if type nfsconf >/dev/null 2>&1; then
- NFS_HOSTNAME=$(nfsconf --get statd name)
- elif type git >/dev/null 2>&1; then
- # git to the rescue!
- NFS_HOSTNAME=$(git config --file=/etc/nfs.conf statd.name)
- fi
-fi
-
-[ -n "$NFS_HOSTNAME" ] ||
- die "NFS_HOSTNAME is not configured. statd_callout_helper failed"
-
############################################################
ctdb_setup_state_dir "service" "nfs"