From ac1c12b5a21ed2666478817b377acf8f5aa48644 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 4 Apr 2018 19:16:57 +1000 Subject: [PATCH] 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 Reviewed-by: Amitay Isaacs --- ctdb/config/ctdb-crash-cleanup.sh | 2 +- ctdb/config/debug-hung-script.sh | 2 +- ctdb/config/debug_locks.sh | 2 +- ctdb/config/events.d/06.nfs | 2 +- ctdb/tests/eventscripts/06.nfs.releaseip.001.sh | 2 +- ctdb/tests/eventscripts/06.nfs.releaseip.002.sh | 2 +- ctdb/tests/eventscripts/06.nfs.takeip.001.sh | 2 +- ctdb/tests/eventscripts/06.nfs.takeip.002.sh | 2 +- ctdb/tests/eventscripts/scripts/06.nfs.sh | 2 +- ctdb/tools/ctdb_lvs | 2 +- ctdb/tools/ctdb_natgw | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ctdb/config/ctdb-crash-cleanup.sh b/ctdb/config/ctdb-crash-cleanup.sh index 8f4cc8645661..896a90cda982 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 d6ff833a43ed..03d5ea2f6a0d 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 e51640bbee5e..db02f0cdbaa1 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 785188e5ecec..4e029065ab06 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 8bf0fa29e7ae..fe5994e3f115 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 <