__debug -> __cdist_loglevel

This commit is contained in:
Darko Poljak 2017-09-06 21:59:57 +02:00
parent eae399b025
commit 92488e83d6

View file

@ -22,8 +22,16 @@ uri="$(cat "$__object/parameter/uri" 2>/dev/null \
|| echo "$__object_id")" || echo "$__object_id")"
target="$(cat "$__object/parameter/target")" target="$(cat "$__object/parameter/target")"
[ "$__debug" = "yes" ] && curl="curl" || curl="curl -s" case "$__cdist_loglevel" in
[ "$__debug" = "yes" ] && tar="tar -xvzp" || tar="tar -xzp" 10|5) # DEBUG or TRACE
curl="curl"
tar="tar -xvzp"
;;
*)
curl="curl -s"
tar="tar -xzp"
;;
esac
if [ -f "$__object/parameter/insecure" ] ; then if [ -f "$__object/parameter/insecure" ] ; then
curl="$curl -k" curl="$curl -k"