From 41e866b7485886edb9c56b5d19c3c859bbf8fa9b Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 4 Jun 2008 15:37:12 -0400 Subject: Add -p/--password option so the DM password can be passed on the command-line. The import for version moved from ipaserver to ipa, fix that as well. 449858 --- ipa-server/ipa-install/ipa-replica-install | 15 ++++++++++----- ipa-server/man/ipa-replica-install.1 | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ipa-server/ipa-install/ipa-replica-install b/ipa-server/ipa-install/ipa-replica-install index 2b375165..a2798bb2 100644 --- a/ipa-server/ipa-install/ipa-replica-install +++ b/ipa-server/ipa-install/ipa-replica-install @@ -28,7 +28,7 @@ from ipa import ipautil from ipaserver import dsinstance, replication, installutils, krbinstance, service from ipaserver import httpinstance, ntpinstance, certs, ipaldap -from ipaserver import version +from ipa import version class ReplicaConfig: def __init__(self): @@ -48,6 +48,8 @@ def parse_options(): help="do not configure ntp", default=True) parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False, help="gather extra debugging information") + parser.add_option("-p", "--password", dest="password", + help="Directory Manager (existing master) password") options, args = parser.parse_args() @@ -196,10 +198,13 @@ def main(): config.dir = dir # get the directory manager password - try: - config.dirman_password = get_dirman_password() - except KeyboardInterrupt: - sys.exit(0) + if not options.password: + try: + config.dirman_password = get_dirman_password() + except KeyboardInterrupt: + sys.exit(0) + else: + config.dirman_password = options.password # Try out the password try: diff --git a/ipa-server/man/ipa-replica-install.1 b/ipa-server/man/ipa-replica-install.1 index 4041f0c9..674afd12 100644 --- a/ipa-server/man/ipa-replica-install.1 +++ b/ipa-server/man/ipa-replica-install.1 @@ -32,6 +32,9 @@ Enable debug logging when more verbose output is needed .TP \fB\-n\fR, \fB\-\-no\-ntp\fR Do not configure NTP +.TP +\fB\-p\fR, \fB\-\-password\fR=\fIDM_PASSWORD\fR +Directory Manager (existing master) password .SH "EXIT STATUS" 0 if the command was successful -- cgit