Allow command-line options with --gen-answer-file

Previously, packstack --gen-answer-file did not allow settting any
other command-line option other than the default password. This is
not required, with this patch the answer file would contain any
command-line specified option as well.

Change-Id: Ic5180fa37bb0dc1371f58132f9c70dd655c0fc8c
This commit is contained in:
Javier Pena
2015-02-20 11:17:07 +01:00
parent 92e69bd080
commit 184dad441c
2 changed files with 3 additions and 5 deletions

View File

@@ -801,7 +801,7 @@ def initCmdLineParser():
# Init parser and all general flags
usage = "usage: %prog [options] [--help]"
parser = OptionParser(usage=usage, version="%prog {0} {1}".format(version.release_string(), version.version_string()))
parser.add_option("--gen-answer-file", help="Generate a template of an answer file, using this option excludes all other options")
parser.add_option("--gen-answer-file", help="Generate a template of an answer file.")
parser.add_option("--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the"
"configuration file. using this option excludes all other options")
parser.add_option("--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list "
@@ -972,8 +972,6 @@ def main():
# If --gen-answer-file was supplied, do not run main
if options.gen_answer_file:
# Make sure only --gen-answer-file was supplied
validateSingleFlag(options, "gen_answer_file")
answerfilepath = _gettmpanswerfilepath()
if not answerfilepath:
_printAdditionalMessages()