summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-01-26 10:39:48 +0000
committerJan Cholasta <jcholast@redhat.com>2015-01-27 07:41:58 +0000
commitc90286cbbc1ab21e185c4d60d3a86142172c47ca (patch)
tree87568c49a431849746e71ecf5141669093626684
parentf30865c5f07bdc4d5f87e89f9ed99148f4d361ce (diff)
downloadfreeipa-c90286cbbc1ab21e185c4d60d3a86142172c47ca.tar.gz
freeipa-c90286cbbc1ab21e185c4d60d3a86142172c47ca.tar.xz
freeipa-c90286cbbc1ab21e185c4d60d3a86142172c47ca.zip
Create correct log directories during full restore in ipa-restore
https://fedorahosted.org/freeipa/ticket/4865 Reviewed-By: Martin Kosek <mkosek@redhat.com>
-rw-r--r--ipaserver/install/ipa_restore.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py
index b65a3f3fc..de926b1a2 100644
--- a/ipaserver/install/ipa_restore.py
+++ b/ipaserver/install/ipa_restore.py
@@ -712,22 +712,21 @@ class Restore(admintool.AdminTool):
not exist then tomcat will fail to start.
The directory is different depending on whether we have a d9-based
- or a d10-based installation. We can tell based on whether there is
- a PKI-IPA 389-ds instance.
+ or a d10-based installation.
"""
- if os.path.exists(paths.ETC_SLAPD_PKI_IPA_DIR): # dogtag 9
- topdir = paths.PKI_CA_LOG_DIR
- dirs = [topdir,
- '/var/log/pki-ca/signedAudit,']
- else: # dogtag 10
- topdir = paths.TOMCAT_TOPLEVEL_DIR
- dirs = [topdir,
- paths.TOMCAT_CA_DIR,
- paths.TOMCAT_CA_ARCHIVE_DIR,
- paths.TOMCAT_SIGNEDAUDIT_DIR,]
-
- if os.path.exists(topdir):
- return
+ dirs = []
+ # dogtag 9
+ if (os.path.exists(paths.VAR_LIB_PKI_CA_DIR) and
+ not os.path.exists(paths.PKI_CA_LOG_DIR)):
+ dirs += [paths.PKI_CA_LOG_DIR,
+ os.path.join(paths.PKI_CA_LOG_DIR, 'signedAudit')]
+ # dogtag 10
+ if (os.path.exists(paths.VAR_LIB_PKI_TOMCAT_DIR) and
+ not os.path.exists(paths.TOMCAT_TOPLEVEL_DIR)):
+ dirs += [paths.TOMCAT_TOPLEVEL_DIR,
+ paths.TOMCAT_CA_DIR,
+ paths.TOMCAT_CA_ARCHIVE_DIR,
+ paths.TOMCAT_SIGNEDAUDIT_DIR]
try:
pent = pwd.getpwnam(PKI_USER)