parent
14d0685edc
commit
fcd0acfef2
|
|
@ -32,7 +32,9 @@ def initialize_arguments():
|
||||||
parser.add_argument("--config", nargs="?", help="JSON configuration file or URL")
|
parser.add_argument("--config", nargs="?", help="JSON configuration file or URL")
|
||||||
parser.add_argument("--creds", nargs="?", help="JSON credentials configuration file")
|
parser.add_argument("--creds", nargs="?", help="JSON credentials configuration file")
|
||||||
parser.add_argument("--silent", action="store_true",
|
parser.add_argument("--silent", action="store_true",
|
||||||
help="Warning!!! No prompts, ignored if config is not passed")
|
help="WARNING: Disables all prompts for input and confirmation. If no configuration is provided, this is ignored")
|
||||||
|
parser.add_argument("--dry-run", action="store_true",
|
||||||
|
help="Generates a configuration file and then exits instead of performing an installation")
|
||||||
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
|
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
|
||||||
args, unknowns = parser.parse_known_args()
|
args, unknowns = parser.parse_known_args()
|
||||||
if args.config is not None:
|
if args.config is not None:
|
||||||
|
|
@ -61,6 +63,8 @@ def initialize_arguments():
|
||||||
key, val = arg[2:], True
|
key, val = arg[2:], True
|
||||||
config[key] = val
|
config[key] = val
|
||||||
config["script"] = args.script
|
config["script"] = args.script
|
||||||
|
if args.dry_run is not None:
|
||||||
|
config["dry_run"] = args.dry_run
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,9 @@ def perform_installation_steps():
|
||||||
config_file.write(user_configuration)
|
config_file.write(user_configuration)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
if archinstall.arguments.get('dry_run'):
|
||||||
|
exit(0)
|
||||||
|
|
||||||
if not archinstall.arguments.get('silent'):
|
if not archinstall.arguments.get('silent'):
|
||||||
input('Press Enter to continue.')
|
input('Press Enter to continue.')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue