From 4dded1074b4dcdd1b63177e0979dbb02436260fb Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 8 Nov 2023 14:35:05 +0100 Subject: [PATCH] Removing logfiles of cloud-init. --- postinstall-scripts/update-all-packages | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5