mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Martin Basti
parent
6941f4eec7
commit
31776755b4
@@ -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