Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-06-10 13:34:59 +0200
committerGitHub <noreply@github.com>2021-06-10 13:34:59 +0200
commit14d0685edc18515e3eb2bbe6e8d0df5c589b3f04 (patch)
treecdb50d9e24b0d1ae0352fd552464976290267ed6 /archinstall
parent67b1a9395f02593fb4455c999dc1c270157133f4 (diff)
parent9bec42ad0835864eee47b6b17c486930b672f29f (diff)
Merge pull request #552 from l4zy0n3/patch-1
added support for optionally seperating credentials from config
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index 0b799d5b..bbad316d 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -30,6 +30,7 @@ storage['__version__'] = __version__
def initialize_arguments():
config = {}
parser.add_argument("--config", nargs="?", help="JSON configuration file or URL")
+ parser.add_argument("--creds", nargs="?", help="JSON credentials configuration file")
parser.add_argument("--silent", action="store_true",
help="Warning!!! No prompts, ignored if config is not passed")
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
@@ -47,6 +48,9 @@ def initialize_arguments():
config = json.loads(response.read())
except Exception as e:
print(e)
+ if args.creds is not None:
+ with open(args.creds) as file:
+ config.update(json.load(file))
# Installation can't be silent if config is not passed
config["silent"] = args.silent
for arg in unknowns: