]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Improve setting of helper paths
authorMartin Schwenke <martin@meltin.net>
Wed, 14 Mar 2018 04:03:19 +0000 (15:03 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:19 +0000 (02:23 +0100)
Make use of variables provided by script_install_paths.sh instead of
reinventing the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/tool/scripts/local.sh

index 38184f9f2a03d5261562e156d2321a5ba127e841..a419552cb34ffdc19e7374ef31c4f5a451da3d64 100644 (file)
@@ -72,13 +72,7 @@ setup_natgw ()
 {
        debug "Setting up NAT gateway"
 
-       # Use in-tree binaries if running against local daemons.
-       # Otherwise CTDB need to be installed on all nodes.
-       if [ -n "$ctdb_dir" -a -d "${ctdb_dir}/bin" ] ; then
-               if [ -z "$CTDB_NATGW_HELPER" ] ; then
-                       export CTDB_NATGW_HELPER="${ctdb_dir}/tools/ctdb_natgw"
-               fi
-       fi
+       export CTDB_NATGW_HELPER="${CTDB_SCRIPTS_TOOLS_HELPER_DIR}/ctdb_natgw"
 
        natgw_config_dir="${TEST_VAR_DIR}/natgw_config"
        mkdir -p "$natgw_config_dir"
@@ -93,13 +87,7 @@ setup_lvs ()
 {
        debug "Setting up LVS"
 
-       # Use in-tree binaries if running against local daemons.
-       # Otherwise CTDB need to be installed on all nodes.
-       if [ -n "$ctdb_dir" -a -d "${ctdb_dir}/bin" ] ; then
-               if [ -z "$CTDB_LVS_HELPER" ] ; then
-                       export CTDB_LVS_HELPER="${ctdb_dir}/tools/ctdb_lvs"
-               fi
-       fi
+       export CTDB_LVS_HELPER="${CTDB_SCRIPTS_TOOLS_HELPER_DIR}/ctdb_lvs"
 
        lvs_config_dir="${TEST_VAR_DIR}/lvs_config"
        mkdir -p "$lvs_config_dir"