Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorWerner Llácer <wllacer@gmail.com>2022-03-28 13:44:10 +0200
committerGitHub <noreply@github.com>2022-03-28 13:44:10 +0200
commite85c9b65315498ab4701ea31c079d198eba8d9ac (patch)
treee19c6066c3ba0d27f724f783431165199b98c991 /examples
parent69bd88a7f9f537b8015915110ee9e4333be31fc1 (diff)
Issues with Network Management and user management in menu (#1036)
* A problem with default values treatment at superusers (and users) on the main menu * Solving issues when changing the selection of nic, ask_to_configure_network failed in several places. Solved, temporarily with the creation of __getitem__ and get methods at NetworkManager * Accept old style definitions for nic * flake8 complains * log string corrected (issue 1039) * Correct exit when no disk is selected and we don't wish to continue
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py10
-rw-r--r--examples/swiss.py10
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 37f4cf72..a677baa9 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -185,11 +185,13 @@ def perform_installation(mountpoint):
if archinstall.arguments.get('profile', None):
installation.install_profile(archinstall.arguments.get('profile', None))
- for user, user_info in archinstall.arguments.get('!users', {}).items():
- installation.user_create(user, user_info["!password"], sudo=False)
+ if archinstall.arguments.get('!users',{}):
+ for user, user_info in archinstall.arguments.get('!users', {}).items():
+ installation.user_create(user, user_info["!password"], sudo=False)
- for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
- installation.user_create(superuser, user_info["!password"], sudo=True)
+ if archinstall.arguments.get('!superusers',{}):
+ for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
+ installation.user_create(superuser, user_info["!password"], sudo=True)
if timezone := archinstall.arguments.get('timezone', None):
installation.set_timezone(timezone)
diff --git a/examples/swiss.py b/examples/swiss.py
index cf864ed5..6f524103 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -415,11 +415,13 @@ def os_setup(installation):
if archinstall.arguments.get('profile', None):
installation.install_profile(archinstall.arguments.get('profile', None))
- for user, user_info in archinstall.arguments.get('!users', {}).items():
- installation.user_create(user, user_info["!password"], sudo=False)
+ if archinstall.arguments.get('!users',{}):
+ for user, user_info in archinstall.arguments.get('!users', {}).items():
+ installation.user_create(user, user_info["!password"], sudo=False)
- for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
- installation.user_create(superuser, user_info["!password"], sudo=True)
+ if archinstall.arguments.get('!superusers',{}):
+ for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
+ installation.user_create(superuser, user_info["!password"], sudo=True)
if timezone := archinstall.arguments.get('timezone', None):
installation.set_timezone(timezone)