From 73364999957b5711ba1f5a3ee0e421524b4550d6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:34:34 +0100 Subject: [PATCH] shrink cdist-remote-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 -- bin/cdist-remote-code-run | 2 +- bin/cdist-remote-code-run-all | 10 +--------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d122ac08..d464c523 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -52,11 +52,9 @@ cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" -# Transfer all objects including code cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" -# And finally - execute the code cdist-code-run-all "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index a9ecd886..a4958897 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -30,7 +30,7 @@ __cdist_out_object_dir="$1"; shift object="$1"; shift -finished="$(__cdist_object_code_finished "$__cdist_object")" +finished="$(__cdist_object_code_finished "$object")" code="$(__cdist_object_code "$object")" require="$(__cdist_object_require "$object")" diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all index 6c60337a..1f051258 100755 --- a/bin/cdist-remote-code-run-all +++ b/bin/cdist-remote-code-run-all @@ -31,13 +31,5 @@ __cdist_out_object_dir="$1"; shift __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do - code="$(__cdist_object_code "$object")" - require="$(__cdist_object_require "$object")" - - # Object code depends on others, execute them before us - if [ -f "$require" ]; then - while read requirement; do - cdist-remote-code-run "$code" - done < "$require" - fi + cdist-remote-code-run "$__cdist_out_object_dir" "$object" done < "$__cdist_tmp_file"