summaryrefslogtreecommitdiffstats
path: root/base/server/sbin
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2016-12-21 04:35:21 +0100
committerEndi S. Dewata <edewata@redhat.com>2016-12-21 07:56:11 +0100
commit52cf2bb8c4cc2d60bef779e9874c696296afa30a (patch)
tree1561a210780266183e95f84f39085425e523f471 /base/server/sbin
parent9822676b7f00cc7e78d42c50c2506a289ed9c1c6 (diff)
Refactored master & slots dictionaries creation.
To improve reusability the deployment tools have been modified such that the master and slots dictionary objects are created in PKIDeployer at the beginning of the program. The PKIConfigParser has been modified to use the same dictionary objects.
Diffstat (limited to 'base/server/sbin')
-rwxr-xr-xbase/server/sbin/pkidestroy7
-rwxr-xr-xbase/server/sbin/pkispawn7
2 files changed, 10 insertions, 4 deletions
diff --git a/base/server/sbin/pkidestroy b/base/server/sbin/pkidestroy
index 923b55076..0c62c671c 100755
--- a/base/server/sbin/pkidestroy
+++ b/base/server/sbin/pkidestroy
@@ -64,6 +64,8 @@ def interrupt_handler(event, frame):
def main(argv):
"""main entry point"""
+ deployer = util.PKIDeployer()
+
config.pki_deployment_executable = os.path.basename(argv[0])
# Set the umask
@@ -100,7 +102,8 @@ def main(argv):
# Read and process command-line arguments.
parser = PKIConfigParser(
'PKI Instance Removal',
- log.PKIDESTROY_EPILOG)
+ log.PKIDESTROY_EPILOG,
+ deployer=deployer)
parser.optional.add_argument(
'-i',
@@ -256,7 +259,7 @@ def main(argv):
# Process the various "scriptlets" to remove the specified PKI subsystem.
pki_subsystem_scriptlets = parser.mdict['destroy_scriplets'].split()
- deployer = util.PKIDeployer(parser.mdict)
+ deployer.init()
try:
for scriptlet_name in pki_subsystem_scriptlets:
diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn
index c87c49a3d..9cddcb291 100755
--- a/base/server/sbin/pkispawn
+++ b/base/server/sbin/pkispawn
@@ -67,6 +67,8 @@ def interrupt_handler(event, frame):
def main(argv):
"""main entry point"""
+ deployer = util.PKIDeployer()
+
config.pki_deployment_executable = os.path.basename(argv[0])
# Set the umask
@@ -102,7 +104,8 @@ def main(argv):
# Read and process command-line arguments.
parser = PKIConfigParser(
'PKI Instance Installation and Configuration',
- log.PKISPAWN_EPILOG)
+ log.PKISPAWN_EPILOG,
+ deployer=deployer)
parser.optional.add_argument(
'-f',
@@ -514,7 +517,7 @@ def main(argv):
# Process the various "scriptlets" to create the specified PKI subsystem.
pki_subsystem_scriptlets = parser.mdict['spawn_scriplets'].split()
- deployer = util.PKIDeployer(parser.mdict, parser.slots_dict)
+ deployer.init()
try:
for scriptlet_name in pki_subsystem_scriptlets: