Read DM password from option in external CA install

ipa-server-install with external CA could not be run in
an unattended mode as DM password was required to decipher answer
cache.

https://fedorahosted.org/freeipa/ticket/2793
This commit is contained in:
Martin Kosek 2012-08-17 09:51:36 +02:00
parent adc2f77a39
commit 489493e690

View File

@ -619,7 +619,10 @@ def main():
# This will override any settings passed in on the cmdline
if ipautil.file_exists(ANSWER_CACHE):
dm_password = read_password("Directory Manager", confirm=False)
if options.dm_password is not None:
dm_password = options.dm_password
else:
dm_password = read_password("Directory Manager", confirm=False)
if dm_password is None:
sys.exit("\nDirectory Manager password required")
try: