Hello,

Fix for https://fedorahosted.org/freeipa/ticket/5470

Thanks,

Gabe
From 9e9b8813d069b3a65e16ef90a602bf35feade9c9 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Fri, 20 Nov 2015 07:54:30 -0700
Subject: [PATCH] Check if IPA is configured before attempting a winsync
 migration

https://fedorahosted.org/freeipa/ticket/5470
---
 ipaserver/install/ipa_winsync_migrate.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ipaserver/install/ipa_winsync_migrate.py b/ipaserver/install/ipa_winsync_migrate.py
index 87e23fb3698bac0a0371a198d95994ed921ee011..6996c7fbd7954245bb5aabb5fad0d31103e3517f 100644
--- a/ipaserver/install/ipa_winsync_migrate.py
+++ b/ipaserver/install/ipa_winsync_migrate.py
@@ -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
@@ -344,6 +344,13 @@ class WinsyncMigrate(admintool.AdminTool):
         api.bootstrap(in_server=True, context='server')
         api.finalize()
 
+        # Check if the IPA server is configured before attempting to migrate
+        try:
+            installutils.check_server_configuration()
+        except RuntimeError as e:
+            sys.exit(e)
+
+
         # Setup LDAP connection
         try:
             api.Backend.ldap2.connect()
-- 
1.8.3.1

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to