Check the dnf check exit code before attempting migration. (#167)

This commit is contained in:
Peter Ajamian 2022-03-04 15:37:58 +13:00 committed by GitHub
parent d5a6e46df3
commit 92b35b59d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -271,6 +271,10 @@ pre_check () {
'migrate2rocky. See the README file for details.'
fi
dnf -y check || exit_message \
'Errors found in dnf/rpm database. Please correct before running '\
'migrate2rocky.'
# Get available space to compare to requirements.
# If the stock kernel is not installed we don't require space in /boot
if ! rpm -q --quiet kernel; then