use __cdist_exec_fail_on_error in bin/cdist-code-run

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 20:11:39 +02:00
commit 813b4e1f2b
3 changed files with 11 additions and 9 deletions

View file

@ -152,20 +152,24 @@ __cdist_echo()
{
__cdist_echo_type="$1"; shift
if [ "$__cdist_object_self" ]; then
__cdist_echo_prefix="$__cdist_object_self"
fi
case "$__cdist_echo_type" in
debug)
if [ "$__cdist_debug" ]; then
echo "Debug: $@"
echo $__cdist_echo_prefix "Debug: $@"
fi
;;
info)
echo "$@"
echo $__cdist_echo_prefix "$@"
;;
warning)
echo "Warning: $@"
echo $__cdist_echo_prefix "Warning: $@"
;;
error)
echo "Error: $@" >&2
echo $__cdist_echo_prefix "Error: $@" >&2
;;
esac
}