remove hard coded variable names; prefix all variables with __cdist_
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								32392d129a
							
						
					
				
			
			
				commit
				
					
						ce62775aec
					
				
			
		
					 1 changed files with 12 additions and 12 deletions
				
			
		| 
						 | 
					@ -27,10 +27,10 @@
 | 
				
			||||||
set -eu
 | 
					set -eu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__cdist_target_host="$1"; shift
 | 
					__cdist_target_host="$1"; shift
 | 
				
			||||||
__object="$1"; shift
 | 
					__cdist_object="$1"; shift
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__object_id="$(__cdist_object_id_from_object "$__object")"
 | 
					__object_id="$(__cdist_object_id_from_object "$__cdist_object")"
 | 
				
			||||||
__cdist_type="$(__cdist_type_from_object "$__object")"
 | 
					__cdist_type="$(__cdist_type_from_object "$__cdist_object")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Check if type of object has >= 1 explorer
 | 
					# Check if type of object has >= 1 explorer
 | 
				
			||||||
| 
						 | 
					@ -45,24 +45,24 @@ if [ "$__cdist_has_explorer" ]; then
 | 
				
			||||||
      __cdist_type_explorer_pushed_add "$__cdist_type"
 | 
					      __cdist_type_explorer_pushed_add "$__cdist_type"
 | 
				
			||||||
   fi
 | 
					   fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   echo "Running explorers for $__object ..."
 | 
					   echo "Running explorers for $__cdist_object ..."
 | 
				
			||||||
   # Copy object parameters
 | 
					   # Copy object parameters
 | 
				
			||||||
   cdist-dir push "$__cdist_target_host"                       \
 | 
					   cdist-dir push "$__cdist_target_host"                       \
 | 
				
			||||||
      "$(__cdist_object_parameter_dir "$__object")"            \
 | 
					      "$(__cdist_object_parameter_dir "$__cdist_object")"            \
 | 
				
			||||||
      "$(__cdist_remote_object_parameter_dir "$__object")"
 | 
					      "$(__cdist_remote_object_parameter_dir "$__cdist_object")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   # Execute explorers
 | 
					   # Execute explorers
 | 
				
			||||||
   cdist-run-remote "$__cdist_target_host"                     \
 | 
					   cdist-run-remote "$__cdist_target_host"                     \
 | 
				
			||||||
      "__object=\"$(__cdist_remote_object_dir "$__object")\""  \
 | 
					      "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object")\"" \
 | 
				
			||||||
      "__object_id=\"$__object_id\""                           \
 | 
					      "$__cdist_name_var_object_id=\"$__object_id\""           \
 | 
				
			||||||
      "$__cdist_name_var_self=\"$__cdist_object\""              \
 | 
					      "$__cdist_name_var_self=\"$__cdist_object\""             \
 | 
				
			||||||
      cdist-remote-explorer-run                                \
 | 
					      cdist-remote-explorer-run                                \
 | 
				
			||||||
      "$__cdist_name_var_type_explorer"                        \
 | 
					      "$__cdist_name_var_type_explorer"                        \
 | 
				
			||||||
      "$(__cdist_remote_type_explorer_dir "$__cdist_type")"    \
 | 
					      "$(__cdist_remote_type_explorer_dir "$__cdist_type")"    \
 | 
				
			||||||
      "$(__cdist_remote_object_type_explorer_dir "$__object")"
 | 
					      "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   # Copy back results
 | 
					   # Copy back results
 | 
				
			||||||
   cdist-dir pull "$__cdist_target_host"                       \
 | 
					   cdist-dir pull "$__cdist_target_host"                       \
 | 
				
			||||||
      "$(__cdist_remote_object_type_explorer_dir "$__object")" \
 | 
					      "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \
 | 
				
			||||||
      "$(__cdist_object_type_explorer_dir "$__object")"
 | 
					      "$(__cdist_object_type_explorer_dir "$__cdist_object")"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue