Check fips-mode-setup if enabled and stop if it is

This commit is contained in:
Louis Abel 2024-08-04 20:59:01 -07:00
parent 39e55e304e
commit 0294a1db6c
Signed by: label
GPG Key ID: 3331F061D1D9990E

View File

@ -273,6 +273,12 @@ pre_check () {
'migrate2rocky9. See the README file for details.' 'migrate2rocky9. See the README file for details.'
fi fi
if ! fips-mode-setup --check | grep -q 'is disabled'; then
exit_message \
'Migration from a system that has FIPS mode enabled is not supported by '\
'migrate2rocky9. Please disable FIPS mode before running migrate2rocky9.'
fi
dnf -y check || exit_message \ dnf -y check || exit_message \
'Errors found in dnf/rpm database. Please correct before running '\ 'Errors found in dnf/rpm database. Please correct before running '\
'migrate2rocky9.' 'migrate2rocky9.'