__cdist prefix in bin/cdist-code-run

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-28 19:01:21 +02:00
parent deb7b2a7fc
commit ae538362e6

View file

@ -32,19 +32,19 @@ if [ ! -d "$(__cdist_object_dir "$__cdist_object_self")" ]; then
__cdist_exit_err "Object undefined"
fi
code="$(__cdist_object_code "$__cdist_object_self" "${__cdist_code_type}")"
__cdist_code="$(__cdist_object_code "$__cdist_object_self" "${__cdist_code_type}")"
__cdist_echo info "Checking code-${__cdist_code_type}"
if [ -e "$code" ]; then
if [ -f "$code" ]; then
if [ -x "$code" ]; then
if [ -e "$__cdist_code" ]; then
if [ -f "$__cdist_code" ]; then
if [ -x "$__cdist_code" ]; then
__cdist_echo info "Executing code-${__cdist_code_type}"
__cdist_exec_fail_on_error "$code"
__cdist_exec_fail_on_error "$__cdist_code"
else
__cdist_exit_err "$code exists, but is not executable."
__cdist_exit_err "$__cdist_code exists, but is not executable."
fi
else
__cdist_exit_err "$code exists, but is not a file."
__cdist_exit_err "$__cdist_code exists, but is not a file."
fi
fi