mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-22 15:13:50 -06:00
Log errors reported by adtrustinstance.check_inst() using logger
It previously only printed the issue which made troubleshooting after the fact difficult. Using logger.error() provides the same visual functionality but also logs to the server install log. Fixes: https://pagure.io/freeipa/issue/9637 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
parent
ffba69648a
commit
e83d949c7f
@ -65,8 +65,8 @@ and re-run ipa-adtrust-instal again afterwards.
|
||||
def check_inst():
|
||||
for smbfile in [paths.SMBD, paths.NET]:
|
||||
if not os.path.exists(smbfile):
|
||||
print("%s was not found on this system" % smbfile)
|
||||
print("Please install the 'samba' packages and " \
|
||||
logger.error("%s was not found on this system", smbfile)
|
||||
logger.error("Please install the 'samba' packages and "
|
||||
"start the installation again")
|
||||
return False
|
||||
|
||||
@ -74,9 +74,10 @@ def check_inst():
|
||||
# by looking for the file /usr/share/ipa/smb.conf.empty
|
||||
if not os.path.exists(os.path.join(paths.USR_SHARE_IPA_DIR,
|
||||
"smb.conf.empty")):
|
||||
print("AD Trust requires the '%s' package" %
|
||||
logger.error("AD Trust requires the '%s' package",
|
||||
constants.IPA_ADTRUST_PACKAGE_NAME)
|
||||
print("Please install the package and start the installation again")
|
||||
logger.error(
|
||||
"Please install the package and start the installation again")
|
||||
return False
|
||||
|
||||
#TODO: Add check for needed samba4 libraries
|
||||
|
Loading…
Reference in New Issue
Block a user