ipa-restore: check whether DS is running before attempting connection
https://fedorahosted.org/freeipa/ticket/4838 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
1 parent
6941f4eec7
commit
31776755b4
1 file changed
+7
@@ -410,6 +410,13 @@ class Restore(admintool.AdminTool):
|
||||
'''
|
||||
Create an ldapi connection and bind to it using autobind as root.
|
||||
'''
|
||||
instance_name = installutils.realm_to_serverid(api.env.realm)
|
||||
|
||||
if not services.knownservices.dirsrv.is_running(instance_name):
|
||||
raise admintool.ScriptError(
|
||||
"directory server instance is not running/configured"
|
||||
)
|
||||
|
||||
if self._conn is not None:
|
||||
return self._conn
|
||||
|
||||
|
||||
Reference in new issue
Block a user