From 68e14ed8ba584d2c2d59ee28083d7b23b2099645 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Jun 04 2008 21:32:47 +0000 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 --- diff --git a/ipa-server/ipa-install/ipa-replica-install b/ipa-server/ipa-install/ipa-replica-install index 2b37516..a2798bb 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 4041f0c..674afd1 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