diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 34662081..df14931b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,10 +49,9 @@ 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" +cdist-manifest-run-all "$__cdist_target_host" exit 1 - -cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index ae568c2a..d4ea18bb 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -53,10 +53,4 @@ cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ # prepend our path, so all cdist tools come before other tools export PATH="${__cdist_out_type_bin_dir}:$PATH" -# Sanity checks -[ -f "${__cdist_manifest}" ] \ - || __cdist_exit_err "Missing manifest ${__cdist_manifest}" -[ -x "${__cdist_manifest}" ] \ - || __cdist_exit_err "${__cdist_manifest} needs to be executable." - __cdist_exec_fail_on_error "${__cdist_manifest}" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index f20171a7..ee15273c 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -47,21 +47,27 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Checking manifest for ${__cdist_object} ..." + echo "Checking manifest for ${__cdist_object_self} ..." __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" __cdist_manifest="$(__cdist_type_manifest "${__cdist_type}")" - # Make __cdist_manifest available for cdist-type-emulator - export __cdist_manifest + if [ -f "$__cdist_manifest" ]; then + if [ -x "$__cdist_manifest" ]; then + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest - echo "Executing manifest ${__cdist_manifest} ..." - # Make variables available to non-core - FIXME: beatify - export $__cdist_name_var_object="$__cdist_cur_object_dir" - export $__cdist_name_var_object_id="$__cdist_object_id" - export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" + echo "Executing manifest ${__cdist_manifest} ..." + # Make variables available to non-core - FIXME: beatify + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + else + __cdist_exit_err "${__cdist_manifest} needs to be executable." + fi + fi fi # done with this object