From f6fac37f1d81c603c7322ed5425413527048496c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Aug 2011 17:50:38 +0200 Subject: [PATCH] successfully run remote code! Signed-off-by: Nico Schottelius --- bin/cdist-config | 7 +++++++ core/__cdist_object_code_run | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 0c72727f..adfd7bd8 100644 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -274,6 +274,13 @@ __cdist_remote_object_dir() echo "$(__cdist_remote_object_base_dir "$1")/${__cdist_name_dot_cdist}" } +__cdist_remote_object_code() +{ + # FIXME: this should probably be __cdist_name_CODE_remote instead, although + # they have the same name always + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_code}-${__cdist_name_gencode_remote}" +} + __cdist_remote_object_parameter_dir() { echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" diff --git a/core/__cdist_object_code_run b/core/__cdist_object_code_run index 53442bbe..734db5c9 100755 --- a/core/__cdist_object_code_run +++ b/core/__cdist_object_code_run @@ -26,7 +26,7 @@ __cdist_object_code_run() { [ $# -eq 1 ] || __cdist_exit_err "" - set -x + # set -x if [ ! -d "$(__cdist_object_dir "$1")" ]; then __cdist_exit_err "Object undefined" @@ -44,5 +44,7 @@ __cdist_object_code_run() if __cdist_is_executable \ "$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then + __cdist_run_remote $(__cdist_remote_object_code "$1") fi + # set +x }