diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 012be584..737c962b 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -59,7 +59,7 @@ if [ ! -f "$__cdist_object_finished" ]; then __cdist_object_gencode_run "$__cdist_object_self" __cdist_dir push "$(__cdist_object_dir "$__cdist_object_self")" \ "$(__cdist_remote_object_dir "$__cdist_object_self")" - cdist-object-code-run "$__cdist_target_host" "$__cdist_object_self" + __cdist_object_code_run "$__cdist_object_self" # Mark this object as done touch "$__cdist_object_finished" diff --git a/bin/cdist-object-code-run b/core/__cdist_object_code_run similarity index 67% rename from bin/cdist-object-code-run rename to core/__cdist_object_code_run index fa63aaba..cecb6659 100755 --- a/bin/cdist-object-code-run +++ b/core/__cdist_object_code_run @@ -22,17 +22,16 @@ # Exec the code for the given object locally and remote # -. cdist-config -[ $# -eq 2 ] || __cdist_usage " " -set -e +__cdist_object_code_run() +{ -__cdist_target_host="$1"; shift -__cdist_object="$1"; shift + __cdist_object_code_run_object="$1"; shift -# Code local -export __cdist_out_object_dir="$__cdist_out_object_dir" -cdist-code-run "$__cdist_object" "${__cdist_name_gencode_local}" + # Code local + export __cdist_out_object_dir="$__cdist_out_object_dir" + cdist-code-run "$__cdist_object_code_run_object" "${__cdist_name_gencode_local}" -# Code remote -cdist-run-remote "$__cdist_target_host" \ - "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" + # Code remote + cdist-run-remote "$__cdist_target_host" \ + "cdist-code-run" "$__cdist_object_code_run_object" "${__cdist_name_gencode_remote}" +}