Check to make sure that we're not already on RockyLinux. (#64)

* Check to make sure that we're not already on RockyLinux.

Trying to migrate RockyLinux to RockyLinux can cause serious problems.
This commit is contained in:
Peter Ajamian 2021-07-01 18:55:27 +12:00 committed by GitHub
parent 1602af296a
commit 24054df6f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -449,6 +449,14 @@ collect_system_info () {
redhat-release-eula
)
# Check to make sure that we don't already have a full or partial
# RockyLinux install.
if [[ $(rpm -qa "${!provides_pkg_map[@]}") ]]; then
exit_message \
$'Found a full or partial RockyLinux install already in place. Aborting\n'
$'because continuing with the migration could cause further damage to system.'
fi
for pkg in "${!provides_pkg_map[@]}"; do
printf '.'
prov=${provides_pkg_map[$pkg]}