diff options
| author | Endi Sukma Dewata <edewata@redhat.com> | 2012-12-04 07:19:43 -0500 |
|---|---|---|
| committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-12-04 13:15:18 -0500 |
| commit | 952300522ab5aaa9343c96dde7d785727cadfd95 (patch) | |
| tree | c312cdaf4443ba70d99d99a66de856766abb315e /base/deploy/src/pkispawn | |
| parent | a3f7d585fed02fb8b0adaf46228f23bf1275c596 (diff) | |
| download | pki-ticket-399-9.tar.gz pki-ticket-399-9.tar.xz pki-ticket-399-9.zip | |
Archiving default deployment configuration.ticket-399-9
The default deployment configuration has been renamed and moved to
/etc/pki/default.cfg to make it more accessible to users. The pkispawn
has been modified to archieve the default deployment configuration
along with the user-provided configuration in the registry. The
pkidestroy will now use both archived configuration files to ensure
proper removal.
Ticket #399
Diffstat (limited to 'base/deploy/src/pkispawn')
| -rwxr-xr-x | base/deploy/src/pkispawn | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/base/deploy/src/pkispawn b/base/deploy/src/pkispawn index 21da9aef7..f64d79575 100755 --- a/base/deploy/src/pkispawn +++ b/base/deploy/src/pkispawn @@ -52,6 +52,8 @@ error was: def main(argv): "main entry point" + config.pki_deployment_executable = os.path.basename(argv[0]) + # Only run this program as "root". if not os.geteuid() == 0: sys.exit("'%s' must be run as root!" % argv[0]) @@ -88,8 +90,31 @@ def main(argv): sys.exit(1) # Read and process command-line arguments. - parser = PKIConfigParser() - parser.process_command_line_arguments(argv) + parser = PKIConfigParser( + 'PKI Instance Installation and Configuration', + log.PKISPAWN_EPILOG) + + parser.mandatory.add_argument('-f', + dest='user_deployment_cfg', action='store', + nargs=1, required=True, metavar='<file>', + help='configuration filename ' + '(MUST specify complete path)') + + parser.optional.add_argument('-u', + dest='pki_update_flag', action='store_true', + help='update instance of specified subsystem') + + args = parser.process_command_line_arguments(argv) + + config.default_deployment_cfg = config.PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE + + # -f <user deployment config> + config.user_deployment_cfg = str(args.user_deployment_cfg).strip('[\']') + + # -u + config.pki_update_flag = args.pki_update_flag + + parser.validate() if not os.path.exists(config.PKI_DEPLOYMENT_SOURCE_ROOT +\ "/" + config.pki_subsystem.lower()): |
