From aa1c7e757ee01759cb08f3dd5d0556cfe2ef8e32 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Wed, 26 Sep 2012 20:17:33 -0500 Subject: 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 --- base/deploy/src/pkispawn | 6 ++++++ base/deploy/src/scriptlets/pkimessages.py | 1 + 2 files changed, 7 insertions(+) (limited to 'base/deploy/src') 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' "\ -- cgit