cleanup cdist-explorer-run-init, export __explorers to general explorers

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-24 14:51:49 +01:00
parent 368eed50c1
commit 212260b46d
3 changed files with 14 additions and 16 deletions

View file

@ -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"

View file

@ -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" \

View file

@ -25,23 +25,23 @@
#
. cdist-config
if [ $# -lt 4 ]; then
__cdist_usage "<work dir> <explorer dir> <variable name> <out dir> [explorer args]"
if [ $# -lt 3 ]; then
__cdist_usage "<variable name> <explorer dir> <out dir> [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##*/}"