check for existence and executable in manifest-run-all, because it's correct for manifest-run to fail if something is broken as it's used for init

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-23 16:45:00 +01:00
parent 65763a1b4d
commit a40974e286
3 changed files with 16 additions and 17 deletions

View file

@ -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"

View file

@ -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}"

View file

@ -47,11 +47,13 @@ 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}")"
if [ -f "$__cdist_manifest" ]; then
if [ -x "$__cdist_manifest" ]; then
# Make __cdist_manifest available for cdist-type-emulator
export __cdist_manifest
@ -62,6 +64,10 @@ while [ "$__cdist_new_objects_created" = "y" ]; do
export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")"
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