summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2018-04-04 19:16:57 +1000
committerAmitay Isaacs <amitay@samba.org>2018-05-12 06:11:17 +0200
commitac1c12b5a21ed2666478817b377acf8f5aa48644 (patch)
tree1154e0d0627c49dab9ded8be8bd763e5c9d8ed57 /ctdb
parent02444e5f479f2d9705de93006916d9cd1333f21c (diff)
downloadsamba-ac1c12b5a21ed2666478817b377acf8f5aa48644.tar.gz
ctdb-scripts: Use load_script_options() in miscellaneous scripts
Some of these just aim to load the generic script.options file while others target more specific files. For NFS configuration, always use 60.nfs.options - even for 06.nfs. This could be carefully documented but will change a lot before release so there is no need. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/config/ctdb-crash-cleanup.sh2
-rwxr-xr-xctdb/config/debug-hung-script.sh2
-rwxr-xr-xctdb/config/debug_locks.sh2
-rwxr-xr-xctdb/config/events.d/06.nfs2
-rwxr-xr-xctdb/tests/eventscripts/06.nfs.releaseip.001.sh2
-rwxr-xr-xctdb/tests/eventscripts/06.nfs.releaseip.002.sh2
-rwxr-xr-xctdb/tests/eventscripts/06.nfs.takeip.001.sh2
-rwxr-xr-xctdb/tests/eventscripts/06.nfs.takeip.002.sh2
-rw-r--r--ctdb/tests/eventscripts/scripts/06.nfs.sh2
-rwxr-xr-xctdb/tools/ctdb_lvs2
-rwxr-xr-xctdb/tools/ctdb_natgw2
11 files changed, 11 insertions, 11 deletions
diff --git a/ctdb/config/ctdb-crash-cleanup.sh b/ctdb/config/ctdb-crash-cleanup.sh
index 8f4cc864566..896a90cda98 100755
--- a/ctdb/config/ctdb-crash-cleanup.sh
+++ b/ctdb/config/ctdb-crash-cleanup.sh
@@ -14,7 +14,7 @@ if service ctdb status >/dev/null 2>&1 ; then
exit 0
fi
-loadconfig
+load_script_options "failover" "11.natgw"
if [ ! -f "$CTDB_BASE/public_addresses" ] ; then
die "No public addresses file found. Can't clean up."
diff --git a/ctdb/config/debug-hung-script.sh b/ctdb/config/debug-hung-script.sh
index d6ff833a43e..03d5ea2f6a0 100755
--- a/ctdb/config/debug-hung-script.sh
+++ b/ctdb/config/debug-hung-script.sh
@@ -8,7 +8,7 @@
. "${CTDB_BASE}/functions"
-loadconfig
+load_script_options
# Testing hook
if [ -n "$CTDB_DEBUG_HUNG_SCRIPT_LOGFILE" ] ; then
diff --git a/ctdb/config/debug_locks.sh b/ctdb/config/debug_locks.sh
index e51640bbee5..db02f0cdbaa 100755
--- a/ctdb/config/debug_locks.sh
+++ b/ctdb/config/debug_locks.sh
@@ -17,7 +17,7 @@
CTDB_DBDIR="${CTDB_VARDIR}/volatile"
CTDB_DBDIR_PERSISTENT="${CTDB_VARDIR}/persistent"
-loadconfig
+load_script_options
(
flock -n 9 || exit 1
diff --git a/ctdb/config/events.d/06.nfs b/ctdb/config/events.d/06.nfs
index 785188e5ece..4e029065ab0 100755
--- a/ctdb/config/events.d/06.nfs
+++ b/ctdb/config/events.d/06.nfs
@@ -8,7 +8,7 @@
service_name="nfs"
-load_script_options
+load_script_options "service" "60.nfs"
ctdb_setup_state_dir "service" "$service_name"
diff --git a/ctdb/tests/eventscripts/06.nfs.releaseip.001.sh b/ctdb/tests/eventscripts/06.nfs.releaseip.001.sh
index 8bf0fa29e7a..fe5994e3f11 100755
--- a/ctdb/tests/eventscripts/06.nfs.releaseip.001.sh
+++ b/ctdb/tests/eventscripts/06.nfs.releaseip.001.sh
@@ -6,7 +6,7 @@ define_test "callout is 'true'"
setup
-setup_script_options <<EOF
+setup_script_options "service" "60.nfs" <<EOF
CTDB_NFS_CALLOUT="true"
EOF
diff --git a/ctdb/tests/eventscripts/06.nfs.releaseip.002.sh b/ctdb/tests/eventscripts/06.nfs.releaseip.002.sh
index 7eb7c33603b..f46dd63761f 100755
--- a/ctdb/tests/eventscripts/06.nfs.releaseip.002.sh
+++ b/ctdb/tests/eventscripts/06.nfs.releaseip.002.sh
@@ -6,7 +6,7 @@ define_test "callout is 'false', causes releaseip-pre to fail"
setup
-setup_script_options <<EOF
+setup_script_options "service" "60.nfs" <<EOF
CTDB_NFS_CALLOUT="echo releaseip-pre ; false"
EOF
diff --git a/ctdb/tests/eventscripts/06.nfs.takeip.001.sh b/ctdb/tests/eventscripts/06.nfs.takeip.001.sh
index 8bf0fa29e7a..fe5994e3f11 100755
--- a/ctdb/tests/eventscripts/06.nfs.takeip.001.sh
+++ b/ctdb/tests/eventscripts/06.nfs.takeip.001.sh
@@ -6,7 +6,7 @@ define_test "callout is 'true'"
setup
-setup_script_options <<EOF
+setup_script_options "service" "60.nfs" <<EOF
CTDB_NFS_CALLOUT="true"
EOF
diff --git a/ctdb/tests/eventscripts/06.nfs.takeip.002.sh b/ctdb/tests/eventscripts/06.nfs.takeip.002.sh
index 5c9c5eee437..4c6cfba9573 100755
--- a/ctdb/tests/eventscripts/06.nfs.takeip.002.sh
+++ b/ctdb/tests/eventscripts/06.nfs.takeip.002.sh
@@ -6,7 +6,7 @@ define_test "callout is 'false', causes takeip-pre to fail"
setup
-setup_script_options <<EOF
+setup_script_options "service" "60.nfs" <<EOF
CTDB_NFS_CALLOUT="echo takeip-pre ; false"
EOF
diff --git a/ctdb/tests/eventscripts/scripts/06.nfs.sh b/ctdb/tests/eventscripts/scripts/06.nfs.sh
index a62f0b0a1b2..d0b748c1454 100644
--- a/ctdb/tests/eventscripts/scripts/06.nfs.sh
+++ b/ctdb/tests/eventscripts/scripts/06.nfs.sh
@@ -1,6 +1,6 @@
setup ()
{
- setup_script_options <<EOF
+ setup_script_options "service" "60.nfs" <<EOF
CTDB_MANAGES_NFS="yes"
EOF
}
diff --git a/ctdb/tools/ctdb_lvs b/ctdb/tools/ctdb_lvs
index 880069f2408..ec679c5e357 100755
--- a/ctdb/tools/ctdb_lvs
+++ b/ctdb/tools/ctdb_lvs
@@ -6,7 +6,7 @@ fi
. "${CTDB_BASE}/functions"
-loadconfig
+load_script_options "failover" "91.lvs"
# Default LVS nodes file location
[ -n "$CTDB_LVS_NODES" ] || CTDB_LVS_NODES="${CTDB_BASE}/lvs_nodes"
diff --git a/ctdb/tools/ctdb_natgw b/ctdb/tools/ctdb_natgw
index 21744ddfd0f..d37b9f7c0b9 100755
--- a/ctdb/tools/ctdb_natgw
+++ b/ctdb/tools/ctdb_natgw
@@ -6,7 +6,7 @@ fi
. "${CTDB_BASE}/functions"
-loadconfig
+load_script_options "failover" "11.natgw"
# Default NAT gateway nodes file location
[ -n "$CTDB_NATGW_NODES" ] || CTDB_NATGW_NODES="${CTDB_BASE}/natgw_nodes"