forked from ungleich-public/cdist
		
	log improvements
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								b86d3ba26a
							
						
					
				
			
			
				commit
				
					
						315de6fe15
					
				
			
		
					 2 changed files with 6 additions and 7 deletions
				
			
		|  | @ -27,12 +27,12 @@ | ||||||
| set -eu | set -eu | ||||||
| 
 | 
 | ||||||
| __cdist_target_host="$1"; shift | __cdist_target_host="$1"; shift | ||||||
| __cdist_object="$1"; shift | __cdist_object_self="$1"; shift | ||||||
| __cdist_gencode_type="$1"; shift | __cdist_gencode_type="$1"; shift | ||||||
| 
 | 
 | ||||||
| __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" | __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" | ||||||
| __cdist_type="$(__cdist_type_from_object "$__cdist_object")" | __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" | ||||||
| __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" | __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" | ||||||
| 
 | 
 | ||||||
| # Full path to where the executable of the type should exist, if the type has one | # Full path to where the executable of the type should exist, if the type has one | ||||||
| gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}" | gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}" | ||||||
|  | @ -55,7 +55,7 @@ eof | ||||||
|    __cdist_exec_fail_on_error "$gencode" |    __cdist_exec_fail_on_error "$gencode" | ||||||
| else | else | ||||||
|    if [ -f "$gencode" ]; then |    if [ -f "$gencode" ]; then | ||||||
|       echo "Warning: $gencode exists, but is not executable" >&2 |       __cdist_exit_err "$gencode exists, but is not executable" | ||||||
|    fi |    fi | ||||||
| 
 | 
 | ||||||
|    # No gencode? also fine! Ensure we exit 0 |    # No gencode? also fine! Ensure we exit 0 | ||||||
|  |  | ||||||
|  | @ -44,7 +44,6 @@ if [ ! -f "$__cdist_object_finished" ]; then | ||||||
|    # Resolve dependencies, if any |    # Resolve dependencies, if any | ||||||
|    __cdist_object_require="$(__cdist_object_require "$__cdist_object_self")" |    __cdist_object_require="$(__cdist_object_require "$__cdist_object_self")" | ||||||
|    if [ -f "$__cdist_object_require" ]; then |    if [ -f "$__cdist_object_require" ]; then | ||||||
|       echo  |  | ||||||
|       # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP |       # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP | ||||||
|       while read __cdist_requirement; do |       while read __cdist_requirement; do | ||||||
|          set -- "$@" "$__cdist_requirement" |          set -- "$@" "$__cdist_requirement" | ||||||
|  | @ -52,7 +51,7 @@ if [ ! -f "$__cdist_object_finished" ]; then | ||||||
| 
 | 
 | ||||||
|       while [ $# -gt 0 ]; do |       while [ $# -gt 0 ]; do | ||||||
|          __cdist_requirement="$1"; shift |          __cdist_requirement="$1"; shift | ||||||
|          __cdist_echo info "Resolving dependency $__cdist_requirement" |          __cdist_echo info "Resolving requirement $__cdist_requirement" | ||||||
|          cdist-object-run "$__cdist_target_host" "$__cdist_requirement" |          cdist-object-run "$__cdist_target_host" "$__cdist_requirement" | ||||||
|       done |       done | ||||||
|    fi |    fi | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue