diff options
Diffstat (limited to 'base/deploy/src/pkidestroy')
-rwxr-xr-x | base/deploy/src/pkidestroy | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/base/deploy/src/pkidestroy b/base/deploy/src/pkidestroy index fd99d5eae..33866ba11 100755 --- a/base/deploy/src/pkidestroy +++ b/base/deploy/src/pkidestroy @@ -35,7 +35,6 @@ try: import subprocess import time from time import strftime as date - from pki.deployment import pkiconfig as config from pki.deployment.pkiconfig import PKIConfig from pki.deployment.pkiparser import PKIConfigParser from pki.deployment import pkilogging @@ -61,6 +60,8 @@ def main(argv): # Set the umask os.umask(PKIConfig.PKI_DEPLOYMENT_DEFAULT_UMASK) + config = PKIConfig() + # Set installation time ticks = time.time() config.pki_install_time = time.asctime(time.localtime(ticks)) @@ -94,7 +95,7 @@ def main(argv): # Read and process command-line arguments. parser = PKIConfigParser() - parser.process_command_line_arguments(argv) + parser.process_command_line_arguments(argv, config) # Enable 'pkidestroy' logging. pkilogging.pki_log_dir = config.pki_root_prefix +\ @@ -115,7 +116,7 @@ def main(argv): sys.exit(1) # Read the specified PKI configuration file. - rv = parser.read_pki_configuration_file() + rv = parser.read_pki_configuration_file(config) if rv != 0: pkilogging.pki_log.error(PKI_UNABLE_TO_PARSE_1, rv, extra=PKIConfig.PKI_INDENTATION_LEVEL_0) @@ -150,7 +151,7 @@ def main(argv): extra=PKIConfig.PKI_INDENTATION_LEVEL_0) # Combine the various sectional dictionaries into a PKI master dictionary - parser.compose_pki_master_dictionary() + parser.compose_pki_master_dictionary(config) config.pki_master_dict['pki_destroy_log'] = pkilogging.pki_log_dir + "/" +\ pkilogging.pki_log_name pkilogging.pki_log.debug(log.PKI_DICTIONARY_MASTER, @@ -177,7 +178,7 @@ def main(argv): "." + pki_scriptlet[4:], fromlist = [pki_scriptlet[4:]]) instance = scriptlet.PkiScriptlet() - rv = instance.destroy() + rv = instance.destroy(config) if rv != 0: sys.exit(1) pkilogging.pki_log.debug(log.PKI_DICTIONARY_MASTER, |