summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-09-26 20:17:33 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-10-01 11:04:10 -0500
commitaa1c7e757ee01759cb08f3dd5d0556cfe2ef8e32 (patch)
tree7896c202c1ecd7245d1412724a6e2982a8f7ca5d
parent7b3df7e287eb544a0bacba93abeea48e72e49db6 (diff)
downloadpki-aa1c7e757ee01759cb08f3dd5d0556cfe2ef8e32.tar.gz
pki-aa1c7e757ee01759cb08f3dd5d0556cfe2ef8e32.tar.xz
pki-aa1c7e757ee01759cb08f3dd5d0556cfe2ef8e32.zip
Added package checking for pkispawn.
The pkispawn has been modified such that it will check whether the package for the subsystem being created has been installed. Ticket #332
-rwxr-xr-xbase/deploy/src/pkispawn6
-rw-r--r--base/deploy/src/scriptlets/pkimessages.py1
2 files changed, 7 insertions, 0 deletions
diff --git a/base/deploy/src/pkispawn b/base/deploy/src/pkispawn
index 795c57917..d3dfb63ca 100755
--- a/base/deploy/src/pkispawn
+++ b/base/deploy/src/pkispawn
@@ -94,6 +94,12 @@ def main(argv):
# Read and process command-line arguments.
parse.process_command_line_arguments(argv)
+ if not os.path.exists(config.PKI_DEPLOYMENT_SOURCE_ROOT +\
+ "/" + config.pki_subsystem.lower()):
+ print "ERROR: " + log.PKI_SUBSYSTEM_NOT_INSTALLED_1 %\
+ config.pki_subsystem.lower()
+ sys.exit(1)
+
# Enable 'pkispawn' logging.
rv = 0
if not config.pki_update_flag:
diff --git a/base/deploy/src/scriptlets/pkimessages.py b/base/deploy/src/scriptlets/pkimessages.py
index ff023c6de..33dd311f5 100644
--- a/base/deploy/src/scriptlets/pkimessages.py
+++ b/base/deploy/src/scriptlets/pkimessages.py
@@ -75,6 +75,7 @@ PKI_SECURITY_DATABASES_ALREADY_EXIST_3 = "Security databases '%s', '%s', "\
"and/or '%s' already exist!"
PKI_SECURITY_DATABASES_DO_NOT_EXIST_3 = "Security databases '%s', '%s', "\
"and/or '%s' do NOT exist!"
+PKI_SUBSYSTEM_NOT_INSTALLED_1 = "Package pki-%s is NOT installed!"
PKI_SUBSYSTEM_ALREADY_EXISTS_2 = "PKI subsystem '%s' for instance '%s' "\
"already exists!"
PKI_SUBSYSTEM_DOES_NOT_EXIST_2 = "PKI subsystem '%s' for instance '%s' "\