diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-12-18 14:46:41 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2013-01-02 01:12:06 -0500 |
commit | d7f98cd28e7329f08413fd367be2d6eb15fe039f (patch) | |
tree | d0c92392a73c176c6d49cdf2b7896cac07ed8a95 /base/deploy/src/scriptlets/infrastructure_layout.py | |
parent | 87af59c01bf14c4c5f9765cce7b52d17f62583ae (diff) | |
download | pki-d7f98cd28e7329f08413fd367be2d6eb15fe039f.tar.gz pki-d7f98cd28e7329f08413fd367be2d6eb15fe039f.tar.xz pki-d7f98cd28e7329f08413fd367be2d6eb15fe039f.zip |
Added interactive subsystem installation.ticket-380-1
The pkispawn has been modified such that if there is no configuration
file 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.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/base/deploy/src/scriptlets/infrastructure_layout.py b/base/deploy/src/scriptlets/infrastructure_layout.py index 947fbcdfe..9b47f2b95 100644 --- a/base/deploy/src/scriptlets/infrastructure_layout.py +++ b/base/deploy/src/scriptlets/infrastructure_layout.py @@ -58,8 +58,18 @@ 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: + f.write('[DEFAULT]\n') + f.write('pki_instance_name=' + master['pki_instance_name'] + '\n') + f.write('[' + master['pki_subsystem'] + ']\n') + f.write('pki_admin_password=' + master['pki_admin_password'] + '\n') + f.write('pki_ds_password=' + master['pki_ds_password'] + '\n') + # establish top-level infrastructure, instance, and subsystem # base directories and create the "registry" symbolic link that # the "pkidestroy" executable relies upon |