summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/service.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-08-23 12:38:45 -0400
committerRob Crittenden <rcritten@redhat.com>2012-09-17 18:43:59 -0400
commit4f76c143d2f2036af02677469c542f563a10158d (patch)
tree8ed4716135c53486710950b453f17bb71f36c658 /ipaserver/install/service.py
parent3dd31a875650c7fe7c67ca6b47f2058c1181dafb (diff)
downloadfreeipa.git-4f76c143d2f2036af02677469c542f563a10158d.tar.gz
freeipa.git-4f76c143d2f2036af02677469c542f563a10158d.tar.xz
freeipa.git-4f76c143d2f2036af02677469c542f563a10158d.zip
Use Dogtag 10 only when it is available
Put the changes from Ade's dogtag 10 patch into namespaced constants in dogtag.py, which are then referenced in the code. Make ipaserver.install.CAInstance use the service name specified in the configuration. Uninstallation, where config is removed before CA uninstall, also uses the (previously) configured value. This and Ade's patch address https://fedorahosted.org/freeipa/ticket/2846
Diffstat (limited to 'ipaserver/install/service.py')
-rw-r--r--ipaserver/install/service.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py
index e15d4e5e..1d157eba 100644
--- a/ipaserver/install/service.py
+++ b/ipaserver/install/service.py
@@ -23,6 +23,7 @@ import tempfile
import pwd
from ipapython import sysrestore
from ipapython import ipautil
+from ipapython import dogtag
from ipapython import services as ipaservices
from ipalib import errors
from ipapython.dn import DN
@@ -41,17 +42,6 @@ AUTO = 1
ENABLED = 2
DISABLED = 3
-# Determine if we have an updated dogtag instance (dogtag 10+) or
-# an older one.
-dogtag_service = 'pki-cad'
-try:
- for line in open("/etc/ipa/default.conf", "r"):
- if "dogtag_version" in line:
- dogtag_service = 'pki-tomcatd'
- break
-except IOError, e:
- pass
-
# The service name as stored in cn=masters,cn=ipa,cn=etc. In the tuple
# the first value is the *nix service name, the second the start order.
SERVICE_LIST = {
@@ -60,7 +50,7 @@ SERVICE_LIST = {
'DNS':('named', 30),
'MEMCACHE':('ipa_memcached', 39),
'HTTP':('httpd', 40),
- 'CA':(dogtag_service, 50),
+ 'CA':('%sd' % dogtag.configured_constants().PKI_INSTANCE_NAME, 50),
'ADTRUST':('smb', 60),
'EXTID':('winbind', 70)
}