summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-10-10 15:25:15 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2011-10-24 10:36:57 +0300
commit3eeac76b3b061c798a1d0e101c197cc78489d5e7 (patch)
tree585825bd290a15428336ae1594b0aad1f6ee0de2 /ipaserver
parent7bde6a7da90dfc5f8953736f27cf9e17e82d14f2 (diff)
downloadfreeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.tar.gz
freeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.tar.xz
freeipa-3eeac76b3b061c798a1d0e101c197cc78489d5e7.zip
Add support for systemd environments and use it to support Fedora 16
https://fedorahosted.org/freeipa/ticket/1192
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/cainstance.py4
-rw-r--r--ipaserver/install/dsinstance.py6
-rw-r--r--ipaserver/install/krbinstance.py1
3 files changed, 6 insertions, 5 deletions
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index c819957a6..fed4b2cdf 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -375,7 +375,7 @@ class CADSInstance(service.Service):
def restart_instance(self):
try:
ipaservices.knownservices.dirsrv.restart(self.serverid)
- if not dsinstance.is_ds_running():
+ if not dsinstance.is_ds_running(self.serverid):
logging.critical("Failed to restart the directory server. See the installation log for details.")
sys.exit(1)
except Exception:
@@ -693,7 +693,7 @@ class CAInstance(service.Service):
def __restart_instance(self):
try:
- self.restart()
+ self.restart(PKI_INSTANCE_NAME)
installutils.wait_for_open_ports('localhost', 9180, 300)
except Exception:
# TODO: roll back here?
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index cd2a21655..e71de6226 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -107,8 +107,8 @@ def check_ports():
ds_secure = installutils.port_available(636)
return (ds_unsecure, ds_secure)
-def is_ds_running():
- return ipaservices.knownservices.dirsrv.is_running()
+def is_ds_running(server_id=''):
+ return ipaservices.knownservices.dirsrv.is_running(instance_name=server_id)
def has_managed_entries(host_name, dm_password):
"""Check to see if the Managed Entries plugin is available"""
@@ -411,7 +411,7 @@ class DsInstance(service.Service):
def restart(self, instance=''):
try:
super(DsInstance, self).restart(instance)
- if not is_ds_running():
+ if not is_ds_running(instance):
logging.critical("Failed to restart the directory server. See the installation log for details.")
sys.exit(1)
installutils.wait_for_open_ports('localhost', self.open_ports, 300)
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
index 70cbe62a2..b4f0a5446 100644
--- a/ipaserver/install/krbinstance.py
+++ b/ipaserver/install/krbinstance.py
@@ -488,6 +488,7 @@ class KrbInstance(service.Service):
self.fstore.backup_file("/etc/dirsrv/ds.keytab")
installutils.create_keytab("/etc/dirsrv/ds.keytab", ldap_principal)
+ update_key_val_in_file("/etc/sysconfig/dirsrv", "KRB5_KTNAME", "/etc/dirsrv/ds.keytab")
update_key_val_in_file("/etc/sysconfig/dirsrv", "export KRB5_KTNAME", "/etc/dirsrv/ds.keytab")
pent = pwd.getpwnam(dsinstance.DS_USER)
os.chown("/etc/dirsrv/ds.keytab", pent.pw_uid, pent.pw_gid)