More checking to make sure to not get any other configurations

This commit is contained in:
lumarel 2021-06-21 20:58:48 +02:00
parent 00cff404c8
commit ad5f8b2e27
2 changed files with 7 additions and 4 deletions

View File

@ -30,6 +30,9 @@ base packages, the migration result will end in a corrupted system.
This especially happens on systems configured with a centralized package management
like Katello (RedHat Satellite 6) or Uyuni (RedHat Satellite 5, SUSE Manager).
If one of these systems is configured it is possible to remove all projects/channels
so the designated /etc/yum.repos.d/redhat.repo or
/etc/yum.repos.d/susemanager:channels.repo file is empty or missing.
#### RHEL migrations show error messages during conversion

View File

@ -188,11 +188,11 @@ exit_clean () {
}
pre_check () {
if [[ -e /etc/yum.repos.d/redhat.repo ]]; then
exit_message "Migration from Katello-modified systems is not supported by migrate2rocky.\nPlease unconfigure all Katello configured repos, remove the /etc/yum.repos.d/redhat.repo file and re-enable the original repos."
if [[ -e /etc/rhsm/ca/katello-server-ca.pem ]] || [[ -s /etc/yum.repos.d/redhat.repo ]]; then
exit_message "Migration from Katello-modified systems is not supported by migrate2rocky. See the README file for details."
fi
if [[ -e /etc/yum.repos.d/susemanager\:channels.repo ]]; then
exit_message "Migration from Uyuni-modified systems is not supported by migrate2rocky.\nPlease unconfigure all Uyuni configured repos, remove the /etc/yum.repos.d/susemanager:channels.repo file and re-enable the original repos."
if [[ -e /etc/salt/minion.d/susemanager.conf ]] || [[ -s /etc/yum.repos.d/susemanager\:channels.repo ]]; then
exit_message "Migration from Uyuni/SUSE Manager-modified systems is not supported by migrate2rocky. See the README file for details."
fi
}