diff options
| author | Abhishek Koneru <akoneru@redhat.com> | 2013-03-21 15:19:10 -0400 |
|---|---|---|
| committer | Abhishek Koneru <akoneru@redhat.com> | 2013-03-26 15:32:39 -0400 |
| commit | 479f7849d0cb52b520f77386cc15b6081c379bb5 (patch) | |
| tree | f9de01b09b93ba2382628a1296c1f31f27484370 /base/deploy/src | |
| parent | 3e70f3ea2abd3f6c855ff433b4b1ee5e0312417c (diff) | |
Change how the password is passed to pkidestroy.
Removed the -w <security domain password> option for pkidestroy.
Added the -W <security domain password file> option which takes a
file containing the password as input. It is an optional parameter.
Added required information in pkidestroy.
Ticket #502
Diffstat (limited to 'base/deploy/src')
| -rwxr-xr-x | base/deploy/src/pkidestroy | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/base/deploy/src/pkidestroy b/base/deploy/src/pkidestroy index 98ac414ac..a50f292c4 100755 --- a/base/deploy/src/pkidestroy +++ b/base/deploy/src/pkidestroy @@ -112,12 +112,13 @@ def main(argv): action='store', nargs=1, metavar='<security domain user>', help='security domain user') - - parser.optional.add_argument('-w', - dest='pki_secdomain_pass', + + parser.optional.add_argument('-W', + dest='pki_secdomain_pass_file', action='store', - nargs=1, metavar='<security domain password>', - help='security domain password') + nargs=1, metavar='<security domain password file>', + help='security domain password file path') + args = parser.process_command_line_arguments(argv) @@ -165,10 +166,12 @@ def main(argv): if args.pki_secdomain_user: config.pki_secdomain_user = str(args.pki_secdomain_user).strip('[\']') - # '-w' - if args.pki_secdomain_pass: - config.pki_secdomain_pass = str(args.pki_secdomain_pass).strip('[\']') + # '-W' password file + if args.pki_secdomain_pass_file: + with open(str(args.pki_secdomain_pass_file).strip('[\']'),'r') as pwd_file: + config.pki_secdomain_pass = pwd_file.readline().strip('\n') + print "Password: " + config.pki_secdomain_pass # verify that previously deployed instance exists deployed_pki_instance_path = config.pki_root_prefix +\ config.PKI_DEPLOYMENT_BASE_ROOT + "/" +\ |
