summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/pkispawn
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-11-28 18:59:06 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-11-28 18:59:06 -0500
commit9248b0307f0fd723689c895f8a826e250ff2db58 (patch)
tree62fc7a02af058705beedba626f4567e8be97ff5a /base/deploy/src/pkispawn
parentb769780f64968c6b8d1dfec6782f73c18a82692f (diff)
downloadpki-9248b0307f0fd723689c895f8a826e250ff2db58.tar.gz
pki-9248b0307f0fd723689c895f8a826e250ff2db58.tar.xz
pki-9248b0307f0fd723689c895f8a826e250ff2db58.zip
Replaced links of scriptlets with lists.ticket-399-4
Previously the deployment tools used symbolic links to determine the scriplets to execute and their order. The code has been changed such that now the scriplets are listed as parameters (spawn_scriplets and destroy_scriplets) in the configuration file. Ticket #403
Diffstat (limited to 'base/deploy/src/pkispawn')
-rwxr-xr-xbase/deploy/src/pkispawn21
1 files changed, 5 insertions, 16 deletions
diff --git a/base/deploy/src/pkispawn b/base/deploy/src/pkispawn
index 8031bbdf5..1adbf05fa 100755
--- a/base/deploy/src/pkispawn
+++ b/base/deploy/src/pkispawn
@@ -167,24 +167,13 @@ def main(argv):
config.pki_log.debug(pkilogging.format(config.pki_master_dict),
extra=config.PKI_INDENTATION_LEVEL_0)
- # Install and configure the specified PKI subsystem.
- pki_scriptlets_path = "/usr/share/pki/deployment/spawn" +\
- "/" + config.pki_subsystem.lower()
- if not os.path.exists(pki_scriptlets_path) or\
- not os.path.isdir(pki_scriptlets_path):
- config.pki_log.error(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1,
- pki_scriptlets_path,
- extra=config.PKI_INDENTATION_LEVEL_0)
- sys.exit(1)
- pki_subsystem_scriptlets = os.listdir(pki_scriptlets_path)
- pki_subsystem_scriptlets.sort()
-
- # Process the various "scriptlets" for the specified PKI subsystem.
+ # Process the various "scriptlets" to create the specified PKI subsystem.
+ pki_subsystem_scriptlets = config.pki_master_dict['spawn_scriplets'].split()
rv = 0
for pki_scriptlet in pki_subsystem_scriptlets:
- scriptlet = __import__("pki.deployment" +\
- "." + pki_scriptlet[4:],
- fromlist = [pki_scriptlet[4:]])
+ scriptlet = __import__("pki.deployment." +
+ pki_scriptlet,
+ fromlist = [pki_scriptlet])
instance = scriptlet.PkiScriptlet()
rv = instance.spawn()
if rv != 0: