argc == 1 for cdist-manifest-run-all

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-18 00:07:49 +01:00
parent b521fa07a1
commit 833c09adce
2 changed files with 5 additions and 8 deletions

View file

@ -48,9 +48,7 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b
cdist-explorer-run-global "$__cdist_target_host"
cdist-manifest-run-init "$__cdist_target_host"
# Create dependent objects
cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir"
cdist-manifest-run-all "$__cdist_target_host"
# Run explorer of each type for every object of types with explorer
cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir"

View file

@ -28,11 +28,10 @@
#
. cdist-config
[ $# -eq 2 ] || __cdist_usage "<target host> <object_base_dir>"
[ $# -eq 1 ] || __cdist_usage "<target host>"
set -eu
__cdist_target_host="$1"; shift
__cdist_object_base_dir="$1"; shift
__cdist_objects_list="${__cdist_tmp_dir}/objects_file"
__cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file"
@ -46,12 +45,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do
# Assume we're done after this run
__cdist_new_objects_created=n
__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_objects_list"
__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects_list"
# Check every object, if we need to run it
while read __cdist_object; do
# Full path to current object
__cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object"
__cdist_cur_object_dir="$__cdist_out_object_dir/$__cdist_object"
# Only the id
__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")"
@ -89,7 +88,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do
[ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y"
# where to save the newly created object
__cdist_object_dir="$__cdist_object_base_dir/$__cdist_new_object"
__cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object"
# Source of the new object
__cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object"