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-30 16:03:27 -0500
commit6344d6e7534696b9c236e818fe6f504bc957adaa (patch)
tree9ca8f34025c4d1e4471f861e630e8f38b8cc0b6a /base/deploy/src/pkispawn
parent471a49326ee8755bf2440962a36a30f4df619a17 (diff)
downloadpki-6344d6e7534696b9c236e818fe6f504bc957adaa.tar.gz
pki-6344d6e7534696b9c236e818fe6f504bc957adaa.tar.xz
pki-6344d6e7534696b9c236e818fe6f504bc957adaa.zip
Replaced links of scriptlets with lists.
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 65c25a93d..73d236247 100755
--- a/base/deploy/src/pkispawn
+++ b/base/deploy/src/pkispawn
@@ -184,24 +184,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()
if not config.pki_update_flag:
rv = instance.spawn()