mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-replica-install --setup-adtrust: check for package ipa-server-trust-ad
When adding the option --setup-adtrust to ipa-replica-install, we need to check that the package freeipa-server-trust-ad is installed. To avoid relying on OS-specific commands like yum, the check is instead ensuring that the file /usr/share/ipa/smb.conf.empty is present (this file is delivered by the package). When the check is unsuccessful, ipa-replica-install exits with an error message. Fixes: https://pagure.io/freeipa/issue/7602 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
23e33443c9
commit
4600e62b6b
@ -15,6 +15,7 @@ class BaseConstantsNamespace:
|
||||
HTTPD_USER = "apache"
|
||||
HTTPD_GROUP = "apache"
|
||||
GSSPROXY_USER = "root"
|
||||
IPA_ADTRUST_PACKAGE_NAME = "freeipa-server-trust-ad"
|
||||
IPA_DNS_PACKAGE_NAME = "freeipa-server-dns"
|
||||
KDCPROXY_USER = "kdcproxy"
|
||||
NAMED_USER = "named"
|
||||
|
@ -13,6 +13,7 @@ from ipaplatform.redhat.constants import RedHatConstantsNamespace
|
||||
|
||||
|
||||
class RHELConstantsNamespace(RedHatConstantsNamespace):
|
||||
IPA_ADTRUST_PACKAGE_NAME = "ipa-server-trust-ad"
|
||||
IPA_DNS_PACKAGE_NAME = "ipa-server-dns"
|
||||
|
||||
constants = RHELConstantsNamespace()
|
||||
|
@ -72,6 +72,15 @@ def check_inst():
|
||||
"start the installation again")
|
||||
return False
|
||||
|
||||
# Check that ipa-server-trust-ad package is installed,
|
||||
# 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" %
|
||||
constants.IPA_ADTRUST_PACKAGE_NAME)
|
||||
print("Please install the package and start the installation again")
|
||||
return False
|
||||
|
||||
#TODO: Add check for needed samba4 libraries
|
||||
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user