summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets/infrastructure_layout.py
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-12-18 14:46:41 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2013-01-11 03:23:28 -0500
commit5d52ca28c2fb1b37f08ff4d5eb4a62cc410468bd (patch)
treed5f9af402158d4c6a8e2573875bc024792ead063 /base/deploy/src/scriptlets/infrastructure_layout.py
parenta4a2cd5db2278e3af0835447060d0051e5d65e60 (diff)
downloadpki-5d52ca28c2fb1b37f08ff4d5eb4a62cc410468bd.tar.gz
pki-5d52ca28c2fb1b37f08ff4d5eb4a62cc410468bd.tar.xz
pki-5d52ca28c2fb1b37f08ff4d5eb4a62cc410468bd.zip
Added interactive subsystem installation.ticket-380-5
The pkispawn has been modified such that if there is no configuration file specified it will enter an interactive mode. The pkidestroy has been modified such that if the instance name or subsystem type is not specified it will enter an interactive mode. Ticket #380
Diffstat (limited to 'base/deploy/src/scriptlets/infrastructure_layout.py')
-rw-r--r--base/deploy/src/scriptlets/infrastructure_layout.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/deploy/src/scriptlets/infrastructure_layout.py b/base/deploy/src/scriptlets/infrastructure_layout.py
index 947fbcdfe..1a2751f63 100644
--- a/base/deploy/src/scriptlets/infrastructure_layout.py
+++ b/base/deploy/src/scriptlets/infrastructure_layout.py
@@ -58,8 +58,14 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
util.directory.create(master['pki_subsystem_registry_path'])
util.file.copy(master['pki_default_deployment_cfg'],
master['pki_default_deployment_cfg_replica'])
- util.file.copy(master['pki_user_deployment_cfg'],
- master['pki_user_deployment_cfg_replica'])
+
+ if master['pki_user_deployment_cfg']:
+ util.file.copy(master['pki_user_deployment_cfg'],
+ master['pki_user_deployment_cfg_replica'])
+ else:
+ with open(master['pki_user_deployment_cfg_replica'], 'w') as f:
+ config.user_config.write(f)
+
# establish top-level infrastructure, instance, and subsystem
# base directories and create the "registry" symbolic link that
# the "pkidestroy" executable relies upon