Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/__init__.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-27 05:48:29 +1000
committerGitHub <noreply@github.com>2022-05-26 21:48:29 +0200
commit870da403e79ab50350803b45f200e0b272334989 (patch)
tree9b203a054bd10cbc73a81b4fd5fe24ef8e6f141a /archinstall/__init__.py
parent353c05318ce80b8eec32031c9e14b8471b458548 (diff)
Rework user management (#1220)
* Rework users * Update user installation * Fix config serialization * Update * Update schemas and documentation * Update * Fix flake8 * Make users mypy compatible * Fix minor copy Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton@hvornum.se>
Diffstat (limited to 'archinstall/__init__.py')
-rw-r--r--archinstall/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index fcb741e6..1e72a60e 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -1,7 +1,4 @@
"""Arch Linux installer - guided, templates etc."""
-import urllib.error
-import urllib.parse
-import urllib.request
from argparse import ArgumentParser
from .lib.disk import *
@@ -13,6 +10,7 @@ from .lib.locale_helpers import *
from .lib.luks import *
from .lib.mirrors import *
from .lib.models.network_configuration import NetworkConfigurationHandler
+from .lib.models.users import User
from .lib.networking import *
from .lib.output import *
from .lib.models.dataclasses import (
@@ -160,7 +158,7 @@ def get_arguments() -> Dict[str, Any]:
if args.creds is not None:
if not json_stream_to_structure('--creds', args.creds, config):
exit(1)
-
+
# load the parameters. first the known, then the unknowns
config.update(vars(args))
config.update(parse_unspecified_argument_list(unknowns))
@@ -211,6 +209,11 @@ def load_config():
handler = NetworkConfigurationHandler()
handler.parse_arguments(arguments.get('nic'))
arguments['nic'] = handler.configuration
+ if arguments.get('!users', None) is not None or arguments.get('!superusers', None) is not None:
+ users = arguments.get('!users', None)
+ superusers = arguments.get('!superusers', None)
+ arguments['!users'] = User.parse_arguments(users, superusers)
+
def post_process_arguments(arguments):
storage['arguments'] = arguments