From 212260b46d2fae4ec65359c51a5cd92207ade446 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:51:49 +0100 Subject: [PATCH] cleanup cdist-explorer-run-init, export __explorers to general explorers Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 8 ++++---- bin/cdist-explorer-run-init | 4 ++-- bin/cdist-remote-explorer-run | 18 ++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 9c042c41..cb6fc8da 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -40,9 +40,12 @@ ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" # Transfer cdist "binaries" cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" -# Execute explorer +# Execute general explorers cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" + +exit 2 + # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" @@ -51,9 +54,6 @@ cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" - -exit 2 - cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index 96049dcd..a6774d11 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -34,8 +34,8 @@ cdist-dir push "$__cdist_target_host" \ # run the initial explorers remotely cdist-run-remote "${__cdist_target_host}" cdist-remote-explorer-run \ - "$__cdist_remote_base_dir" "$__cdist_remote_explorer_dir" \ - "$__cdist_name_var_explorer" "$__cdist_remote_out_explorer_dir" + "$__cdist_name_var_explorer" "$__cdist_remote_explorer_dir" \ + "$__cdist_remote_out_explorer_dir" # retrieve the results cdist-dir pull "$__cdist_target_host" \ diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 6ec0cbed..1be2afd1 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -25,23 +25,23 @@ # . cdist-config -if [ $# -lt 4 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 3 ]; then + __cdist_usage " [explorer args]" fi set -ue -# cd to this dir -__cdist_work_dir="$1"; shift - -# Find explorers here -__cdist_explorer_dir="$1"; shift - # Variable that defines the home of the explorers __cdist_variable_name="$1"; shift +# Find explorers here +__cdist_explorer_dir="$1"; shift + # Write output here __cdist_my_out_dir="$1"; shift +# cd to this dir +__cdist_work_dir="$__cdist_remote_base_dir" + # Setup environment eval export $__cdist_variable_name=\"$__cdist_explorer_dir\" cd "${__cdist_work_dir}" @@ -53,8 +53,6 @@ if [ "$num" -lt 1 ]; then __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" fi -# Setup environment for explorer - # Execute all explorers for explorer in "$__cdist_explorer_dir/"*; do explorer_name="${explorer##*/}"