#
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; echo "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. "$CTDB_BASE/functions"
+. "${CTDB_BASE}/functions"
# If ctdb is running, just exit
if service ctdb status >/dev/null 2>&1 ; then
# for other operating systems.
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; echo "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. "$CTDB_BASE/functions"
+. "${CTDB_BASE}/functions"
loadconfig ctdb
# rather than mutex locks.
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; echo "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. "$CTDB_BASE/functions"
+. "${CTDB_BASE}/functions"
# Default fallback location for database directories.
# These can be overwritten from CTDB configuration
# elsewhere.
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
ctdb_setup_service_state_dir "ctdb"
# script to check accessibility to the reclock file on a node
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
# If CTDB_RECOVERY_LOCK specifies a helper then exit because this
# ctdb event script for checking local file system utilization
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
ctdb_setup_service_state_dir "system-monitoring"
# script to manage nfs in a clustered environment
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name="nfs"
loadconfig
# * For connection tracking/killing to work this script must be enabled.
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
if [ -z "$CTDB_PUBLIC_ADDRESSES" ] ; then
# public interface
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
[ -z "$CTDB_PUBLIC_ADDRESSES" ] && {
#
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name=natgw
# bond1 10.3.3.0/24 10.0.0.1
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
[ -f $CTDB_BASE/static-routes ] || {
#!/bin/sh
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig
service_name=per_ip_routing
#
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name="multipathd"
-loadconfig
+loadconfig
[ -n "$CTDB_MONITOR_MPDEVICES" ] || exit 0
# event script to manage clamd in a cluster environment
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
detect_init_style
# event strict to manage vsftpd in a cluster environment
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name="vsftpd"
# make sure the service is stopped first
# event script to manage httpd in a cluster environment
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
detect_init_style
# ctdb event script for winbind
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-winbind}
# ctdb event script for Samba
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
detect_init_style
# script to manage nfs in a clustered environment
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name="nfs"
loadconfig
# CTDB event script for TGTD based iSCSI
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
service_name="iscsi"
# script to manage the lvs ip multiplexer for a single public address cluster
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
loadconfig ctdb
# the event timeout mechanism.
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+
+. "${CTDB_BASE}/functions"
-. $CTDB_BASE/functions
loadconfig ctdb
[ "$CTDB_RUN_TIMEOUT_MONITOR" = "yes" ] || exit 0
# STATD_HOSTNAME="myhostname -H /etc/ctdb/statd-callout"
[ -n "$CTDB_BASE" ] || \
- export CTDB_BASE=$(cd -P $(dirname "$0") ; echo "$PWD")
+ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
# Overwrite this so we get some logging
die ()