mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Check that port 8443 is available when installing PKI.
https://fedorahosted.org/freeipa/ticket/4564 Reviewed-By: Martin Kosek <mkosek@redhat.com>
This commit is contained in:
parent
018772e11d
commit
b89c184ad5
@ -75,6 +75,11 @@ def parse_options():
|
||||
def get_dirman_password():
|
||||
return installutils.read_password("Directory Manager (existing master)", confirm=False, validate=False)
|
||||
|
||||
def check_ca():
|
||||
if not cainstance.check_port():
|
||||
print "IPA requires port 8443 for PKI but it is currently in use."
|
||||
sys.exit(1)
|
||||
|
||||
def install_dns_records(config, options):
|
||||
|
||||
if not bindinstance.dns_container_exists(config.master_host_name,
|
||||
@ -177,6 +182,8 @@ def main():
|
||||
else:
|
||||
cainstance.replica_ca_install_check(config)
|
||||
|
||||
check_ca()
|
||||
|
||||
# Configure the CA if necessary
|
||||
CA = cainstance.install_replica_ca(config, postinstall=True)
|
||||
|
||||
|
@ -484,6 +484,11 @@ def main():
|
||||
|
||||
check_dirsrv()
|
||||
|
||||
if options.setup_ca:
|
||||
if not cainstance.check_port():
|
||||
print "IPA requires port 8443 for PKI but it is currently in use."
|
||||
sys.exit("Aborting installation")
|
||||
|
||||
if options.conf_ntp:
|
||||
try:
|
||||
ipaclient.ntpconf.check_timedate_services()
|
||||
|
@ -803,6 +803,11 @@ def main():
|
||||
# Make sure the 389-ds ports are available
|
||||
check_dirsrv(options.unattended)
|
||||
|
||||
if setup_ca:
|
||||
if not cainstance.check_port():
|
||||
print "IPA requires port 8443 for PKI but it is currently in use."
|
||||
sys.exit("Aborting installation")
|
||||
|
||||
if options.conf_ntp:
|
||||
try:
|
||||
ipaclient.ntpconf.check_timedate_services()
|
||||
|
@ -105,6 +105,14 @@ def check_inst():
|
||||
|
||||
return True
|
||||
|
||||
def check_port():
|
||||
"""
|
||||
Check that dogtag port (8443) is available.
|
||||
|
||||
Returns True when the port is free, False if it's taken.
|
||||
"""
|
||||
return not ipautil.host_port_open(None, 8443)
|
||||
|
||||
def get_preop_pin(instance_root, instance_name):
|
||||
# Only used for Dogtag 9
|
||||
preop_pin = None
|
||||
|
Loading…
Reference in New Issue
Block a user