summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/pkidestroy
diff options
context:
space:
mode:
authorMatthew Harmsen <mharmsen@redhat.com>2012-07-19 01:04:54 -0700
committerMatthew Harmsen <mharmsen@redhat.com>2012-07-19 10:17:18 -0700
commit5b004df074027d1eba33c2f9038030406830cc3c (patch)
treec14cfe0d4123d6fa704d9f837f37d1688c15bf5c /base/deploy/src/pkidestroy
parent3fcefc1b67e7afe0455267b3876d9e6ef47531cc (diff)
downloadpki-5b004df074027d1eba33c2f9038030406830cc3c.tar.gz
pki-5b004df074027d1eba33c2f9038030406830cc3c.tar.xz
pki-5b004df074027d1eba33c2f9038030406830cc3c.zip
PKI Deployment Scriptlets
* In 'catalina.properties', removed commented out jars for each of the subsystems in the 'common.loader' * In 'server.xml', removed the line containing a '1' * Moved all parameters from the [Mandatory] and [Optional] sections of the 'pkideployment.cfg' file to other more appropriate sections (e.g. - [Common], [CA], [KRA], etc.), and removed these sections and all of their associated logic from the 'pki-deploy' package * Resolved Dogtag TRAC Ticket #225 Dogtag 10: Move "pkispawn"/"pkidestroy" logs * Removed all security domain references from external CA logic * Added new 'pki_subsystem_name' parameter to 'pkideployment.cfg' file, and applied logic throughout 'pki-deploy' * Added new error message in the case of an unset DNS domain name, and replaced the log message with a simple print in the case of a 'domainname' exception
Diffstat (limited to 'base/deploy/src/pkidestroy')
-rwxr-xr-xbase/deploy/src/pkidestroy26
1 files changed, 6 insertions, 20 deletions
diff --git a/base/deploy/src/pkidestroy b/base/deploy/src/pkidestroy
index 5faa97cee..304b0bd0c 100755
--- a/base/deploy/src/pkidestroy
+++ b/base/deploy/src/pkidestroy
@@ -83,9 +83,11 @@ def main(argv):
config.pki_dns_domainname = subprocess.check_output("domainname",
shell=True)
config.pki_dns_domainname = config.pki_dns_domainname.rstrip('\n')
+ if not len(config.pki_dns_domainname):
+ print log.PKI_DNS_DOMAIN_NOT_SET
+ sys.exit(1)
except subprocess.CalledProcessError as exc:
- config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
- extra=config.PKI_INDENTATION_LEVEL_0)
+ print log.PKI_SUBPROCESS_ERROR_1 % exc
sys.exit(1)
# Initialize 'pretty print' for objects
@@ -97,7 +99,7 @@ def main(argv):
# Enable 'pkidestroy' logging.
if not config.pki_dry_run_flag:
config.pki_log_dir = config.pki_root_prefix +\
- "/var/log"
+ config.PKI_DEPLOYMENT_LOG_ROOT
config.pki_log_name = "pki" + "-" +\
config.pki_subsystem.lower() +\
"-" + "destroy" + "." +\
@@ -124,14 +126,6 @@ def main(argv):
sys.exit(1)
else:
# NEVER print out 'sensitive' name/value pairs!!!
- config.pki_log.debug(log.PKI_DICTIONARY_MANDATORY,
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(pp.pformat(config.pki_mandatory_dict),
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(log.PKI_DICTIONARY_OPTIONAL,
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(pp.pformat(config.pki_optional_dict),
- extra=config.PKI_INDENTATION_LEVEL_0)
config.pki_log.debug(log.PKI_DICTIONARY_COMMON,
extra=config.PKI_INDENTATION_LEVEL_0)
config.pki_log.debug(pp.pformat(config.pki_common_dict),
@@ -147,7 +141,7 @@ def main(argv):
# Override PKI configuration file values with 'custom' command-line values.
if not config.custom_pki_admin_domain_name is None:
- config.pki_optional_dict['pki_admin_domain_name'] =\
+ config.pki_common_dict['pki_admin_domain_name'] =\
config.custom_pki_admin_domain_name
if not config.custom_pki_instance_name is None:
config.pki_web_server_dict['pki_instance_name'] =\
@@ -162,14 +156,6 @@ def main(argv):
config.pki_web_server_dict['pki_ajp_port'] =\
config.custom_pki_ajp_port
# NEVER print out 'sensitive' name/value pairs!!!
- config.pki_log.debug(log.PKI_DICTIONARY_MANDATORY,
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(pp.pformat(config.pki_mandatory_dict),
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(log.PKI_DICTIONARY_OPTIONAL,
- extra=config.PKI_INDENTATION_LEVEL_0)
- config.pki_log.debug(pp.pformat(config.pki_optional_dict),
- extra=config.PKI_INDENTATION_LEVEL_0)
config.pki_log.debug(log.PKI_DICTIONARY_COMMON,
extra=config.PKI_INDENTATION_LEVEL_0)
config.pki_log.debug(pp.pformat(config.pki_common_dict),