mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
Check if IPA is configured before attempting a winsync migration
https://fedorahosted.org/freeipa/ticket/5470 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
8909506a88
commit
84e479edaa
@ -29,7 +29,7 @@ from ipapython.dn import DN
|
||||
from ipapython.ipautil import realm_to_suffix, posixify
|
||||
from ipapython.ipa_log_manager import log_mgr
|
||||
from ipaserver.plugins.ldap2 import ldap2
|
||||
from ipaserver.install import replication
|
||||
from ipaserver.install import replication, installutils
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
@ -340,6 +340,12 @@ class WinsyncMigrate(admintool.AdminTool):
|
||||
the plumbing.
|
||||
"""
|
||||
|
||||
# Check if the IPA server is configured before attempting to migrate
|
||||
try:
|
||||
installutils.check_server_configuration()
|
||||
except RuntimeError as e:
|
||||
sys.exit(e)
|
||||
|
||||
# Finalize API
|
||||
api.bootstrap(in_server=True, context='server')
|
||||
api.finalize()
|
||||
|
Loading…
Reference in New Issue
Block a user