summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/pkispawn
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-12-04 07:19:43 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-12-04 10:18:37 -0500
commitfbfdeeaaa75e93ec512c045140a5839dad3e381b (patch)
tree7dbb36f927adccb9f924e7ef9304514b3c262a8b /base/deploy/src/pkispawn
parent66c519f0185f24a650df834d781be2ed7ef857f7 (diff)
downloadpki-fbfdeeaaa75e93ec512c045140a5839dad3e381b.tar.gz
pki-fbfdeeaaa75e93ec512c045140a5839dad3e381b.tar.xz
pki-fbfdeeaaa75e93ec512c045140a5839dad3e381b.zip
Archiving default deployment configuration.ticket-399-7
The default deployment configuration file has been moved to /etc/pki/default.cfg to make it more accessible. The pkispawn has been modified to archieve the default deployment configuration along with the user-provided configuration in the registry. The pkidestroy has been modified to use both archived configuration files to ensure proper removal. Ticket #399
Diffstat (limited to 'base/deploy/src/pkispawn')
-rwxr-xr-xbase/deploy/src/pkispawn29
1 files changed, 27 insertions, 2 deletions
diff --git a/base/deploy/src/pkispawn b/base/deploy/src/pkispawn
index 73d236247..94b1f5b39 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()):