continue
fi
echo " - $( basename "${repo_file}" )"
- rm -fv "${repo_file}"
+ # Important:
+ # Don't remove repo files, only truncate them.
+ # Otherwise they are re-created on dist upgrade and may break the whole thing.
+ cp -v /dev/null "${repo_file}"
done
echo -e "\e[0Ksection_end:$( date +%s ):ks_clear_all_repo_files\r\e[0K"
echo
echo "${HASH_LINE}"
echo "Calling dist_upgrade() ..."
+ echo
+
+ local repo_dir="/etc/yum.repos.d"
+ echo "Directory ${repo_dir} before dist upgrade:"
+ ls -ld "${repo_dir}"/*
+
echo
log "Upgrading all packages ..."
echo
-
if [[ -x /bin/dnf ]] ; then
YUM=dnf
else
fi
if $YUM upgrade --assumeyes ; then
- :
+ echo
+ echo "Directory ${repo_dir} after dist upgrade:"
+ ls -ld "${repo_dir}"/*
+ echo
else
echo "[$(date)]: Upgrading system not successful." | tee -a "${ERROR_POINTER}"
fi