diff options
-rw-r--r-- | ipaplatform/base/constants.py | 2 | ||||
-rw-r--r-- | ipaplatform/base/paths.py | 1 | ||||
-rw-r--r-- | ipaplatform/rhel/constants.py | 2 | ||||
-rw-r--r-- | ipaserver/install/bindinstance.py | 19 | ||||
-rw-r--r-- | ipaserver/install/dns.py | 11 | ||||
-rw-r--r-- | ipaserver/install/dnskeysyncinstance.py | 6 | ||||
-rw-r--r-- | ipaserver/install/opendnssecinstance.py | 8 |
7 files changed, 10 insertions, 39 deletions
diff --git a/ipaplatform/base/constants.py b/ipaplatform/base/constants.py index 70485055f..cef829e2d 100644 --- a/ipaplatform/base/constants.py +++ b/ipaplatform/base/constants.py @@ -8,4 +8,4 @@ This base platform module exports platform dependant constants. class BaseConstantsNamespace(object): - pass + IPA_DNS_PACKAGE_NAME = "freeipa-server-dns" diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py index 575604017..4c93c1f71 100644 --- a/ipaplatform/base/paths.py +++ b/ipaplatform/base/paths.py @@ -218,6 +218,7 @@ class BasePathNamespace(object): GROUPADD = "/usr/sbin/groupadd" HTTPD = "/usr/sbin/httpd" IPA_CLIENT_INSTALL = "/usr/sbin/ipa-client-install" + IPA_DNS_INSTALL = "/usr/sbin/ipa-dns-install" SBIN_IPA_JOIN = "/usr/sbin/ipa-join" IPA_REPLICA_CONNCHECK = "/usr/sbin/ipa-replica-conncheck" IPA_RMKEYTAB = "/usr/sbin/ipa-rmkeytab" diff --git a/ipaplatform/rhel/constants.py b/ipaplatform/rhel/constants.py index eaca48030..17abde1f8 100644 --- a/ipaplatform/rhel/constants.py +++ b/ipaplatform/rhel/constants.py @@ -11,6 +11,6 @@ from ipaplatform.redhat.constants import RedHatConstantsNamespace class RHELConstantsNamespace(RedHatConstantsNamespace): - pass + IPA_DNS_PACKAGE_NAME = "ipa-server-dns" constants = RHELConstantsNamespace() diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 2228342dc..9705e845a 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -62,25 +62,8 @@ named_conf_arg_options_template_nonstr = "%(indent)s%(name)s %(value)s;\n" named_conf_include_re = re.compile(r'\s*include\s+"(?P<path>)"\s*;') named_conf_include_template = "include \"%(path)s\";\n" -def check_inst(unattended): - has_bind = True - named = services.knownservices.named - if not os.path.exists(named.get_binary_path()): - print "BIND was not found on this system" - print ("Please install the '%s' package and start the installation again" - % named.get_package_name()) - has_bind = False - - # Also check for the LDAP BIND plug-in - if not os.path.exists(paths.BIND_LDAP_SO) and \ - not os.path.exists(paths.BIND_LDAP_SO_64): - print "The BIND LDAP plug-in was not found on this system" - print "Please install the 'bind-dyndb-ldap' package and start the installation again" - has_bind = False - - if not has_bind: - return False +def check_inst(unattended): if not unattended and os.path.exists(NAMED_CONF): msg = "Existing BIND configuration detected, overwrite?" return ipautil.user_input(msg, False) diff --git a/ipaserver/install/dns.py b/ipaserver/install/dns.py index d22bce7a7..9430d1899 100644 --- a/ipaserver/install/dns.py +++ b/ipaserver/install/dns.py @@ -9,6 +9,7 @@ from subprocess import CalledProcessError from ipalib import api from ipalib import errors from ipaplatform.paths import paths +from ipaplatform.constants import constants from ipaplatform import services from ipapython import ipautil from ipapython import sysrestore @@ -96,6 +97,10 @@ def install_check(standalone, replica, options, hostname): global reverse_zones fstore = sysrestore.FileStore(paths.SYSRESTORE) + if not ipautil.file_exists(paths.IPA_DNS_INSTALL): + raise RuntimeError("Integrated DNS requires '%s' package" % + constants.IPA_DNS_PACKAGE_NAME) + if standalone: print "==============================================================================" print "This program will setup DNS for the FreeIPA Server." @@ -141,8 +146,7 @@ def install_check(standalone, replica, options, hostname): sys.exit("Aborted") # Check bind packages are installed - if not (bindinstance.check_inst(options.unattended) and - dnskeysyncinstance.check_inst()): + if not bindinstance.check_inst(options.unattended): sys.exit("Aborting installation.") if options.disable_dnssec_master: @@ -177,9 +181,6 @@ def install_check(standalone, replica, options, hostname): sys.exit("Only one DNSSEC key master is supported in current " "version.") - # check opendnssec packages are installed - if not opendnssecinstance.check_inst(): - sys.exit("Aborting installation") if options.kasp_db_file: dnskeysyncd = services.service('ipa-dnskeysyncd') diff --git a/ipaserver/install/dnskeysyncinstance.py b/ipaserver/install/dnskeysyncinstance.py index eb6d07f01..7d1351ccc 100644 --- a/ipaserver/install/dnskeysyncinstance.py +++ b/ipaserver/install/dnskeysyncinstance.py @@ -30,12 +30,6 @@ softhsm_token_label = u'ipaDNSSEC' softhsm_slot = 0 replica_keylabel_template = u"dnssec-replica:%s" -def check_inst(): - if not os.path.exists(paths.DNSSEC_KEYFROMLABEL): - print ("Please install the 'bind-pkcs11-utils' package and start " - "the installation again") - return False - return True def dnssec_container_exists(fqdn, suffix, dm_password=None, ldapi=False, realm=None, autobind=ipaldap.AUTOBIND_DISABLED): diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py index d68691fa3..0f1af828e 100644 --- a/ipaserver/install/opendnssecinstance.py +++ b/ipaserver/install/opendnssecinstance.py @@ -55,14 +55,6 @@ def get_dnssec_key_masters(conn): return keymasters_list -def check_inst(): - if not os.path.exists(paths.ODS_KSMUTIL): - print ("Please install the 'opendnssec' package and start " - "the installation again") - return False - return True - - class OpenDNSSECInstance(service.Service): def __init__(self, fstore=None, dm_password=None, ldapi=False, start_tls=False, autobind=ipaldap.AUTOBIND_ENABLED): |