successfully run remote code!

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-08-09 17:50:38 +02:00
parent 5c35cad477
commit f6fac37f1d
2 changed files with 10 additions and 1 deletions

View file

@ -274,6 +274,13 @@ __cdist_remote_object_dir()
echo "$(__cdist_remote_object_base_dir "$1")/${__cdist_name_dot_cdist}" 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() __cdist_remote_object_parameter_dir()
{ {
echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}"

View file

@ -26,7 +26,7 @@ __cdist_object_code_run()
{ {
[ $# -eq 1 ] || __cdist_exit_err "<object>" [ $# -eq 1 ] || __cdist_exit_err "<object>"
set -x # set -x
if [ ! -d "$(__cdist_object_dir "$1")" ]; then if [ ! -d "$(__cdist_object_dir "$1")" ]; then
__cdist_exit_err "Object undefined" __cdist_exit_err "Object undefined"
@ -44,5 +44,7 @@ __cdist_object_code_run()
if __cdist_is_executable \ if __cdist_is_executable \
"$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then "$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then
__cdist_run_remote $(__cdist_remote_object_code "$1")
fi fi
# set +x
} }