From: Frank Brehm Date: Wed, 12 Oct 2022 16:13:25 +0000 (+0200) Subject: Fixing postinstall-scripts/init-puppet X-Git-Tag: 1.6.9^2~1 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ed7dbeb43dc80069c7cae2a94e19fb0ce31d8dd5;p=pixelpark%2Fcreate-terraform.git Fixing postinstall-scripts/init-puppet --- diff --git a/postinstall-scripts/init-puppet b/postinstall-scripts/init-puppet index f7aa951..5b71e7f 100755 --- a/postinstall-scripts/init-puppet +++ b/postinstall-scripts/init-puppet @@ -734,8 +734,8 @@ generate_facts() { debug "Generatet content of '${yfile}':\n${content}" echo "${content}" > "${yfile}" - if [[ "${INITIAL_INSTALL}" ]] ; then - yfile="${facts_dir}/initial_install.yaml" + yfile="${facts_dir}/initial_install.yaml" + if [[ "${INITIAL_INSTALL}" == "y" ]] ; then info "Generating '${GREEN}${yfile}${NORMAL}' ..." content=$( cat <<-EOF --- @@ -744,6 +744,9 @@ generate_facts() { ) debug "Generatet content of '${yfile}':\n${content}" echo "${content}" > "${yfile}" + elif [[ -f "${yfile}" ]] ; then + info "Removing '${GREEN}${yfile}${NORMAL}' ..." + RM "${yfile}" fi wrong_file="${facts_dir}/host"