From: Frank Brehm Date: Wed, 8 Nov 2023 13:35:05 +0000 (+0100) Subject: Removing logfiles of cloud-init. X-Git-Tag: 1.8.0^2~17 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=4dded1074b4dcdd1b63177e0979dbb02436260fb;p=pixelpark%2Fcreate-terraform.git Removing logfiles of cloud-init. --- diff --git a/postinstall-scripts/update-all-packages b/postinstall-scripts/update-all-packages index 1819baa..d4a9477 100755 --- a/postinstall-scripts/update-all-packages +++ b/postinstall-scripts/update-all-packages @@ -146,6 +146,7 @@ do_el_upgrade() { local found_ip_resolv="n" local awk_script='' local cleaned_old_repo="n" + local logfile= empty_oracle_repo_files || true @@ -198,6 +199,14 @@ ok==1 {print "ip_resolve=4"; ok=0} exec_cmd ${tool} --assumeyes erase cloud-init fi + for logfile in /var/log/cloud-init.log /var/log/cloud-init-output.log ; do + if [[ ! -f "${logfile}}" ]] ; then + continue + fi + info "Removing '${CYAN}${logfile}${NORMAL}' ..." + RM "${logfile}}" + done + echo info "Doing upgrade ..." exec_cmd ${tool} --assumeyes upgrade