Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-03-09 16:22:36 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-03-09 16:22:36 +0100
commit3f8f0020f5ee8985806b1b62c8826f113ee9df51 (patch)
treea5787135d9648468290b3fdf0d82b6e59029ff45 /examples
parentaabdce9286b9b39bbf89bb2ed65c4de5dcf61caa (diff)
Purged last legacy, setting the root pw
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 2a7414ea..9339f969 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -141,12 +141,6 @@ def ask_user_questions():
if not archinstall.arguments.get('!root-password', None):
archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (Recommended: leave blank to leave root disabled): ')
- # # Storing things in _guided_hidden helps us avoid printing it
- # # when echoing user configuration: archinstall.storage['_guided']
- # archinstall.storage['_guided_hidden']['root_pw'] = root_pw
- # archinstall.storage['_guided']['root_unlocked'] = True
- # break
-
# Ask for additional users (super-user if root pw was not set)
archinstall.arguments['users'] = {}
archinstall.arguments['superusers'] = {}
@@ -323,13 +317,9 @@ def perform_installation(device, boot_partition, language, mirrors):
password = users[user]
installation.user_create(user, password, sudo=Tru)
- # sudo = False
- # if 'root_pw' not in archinstall.storage['_guided_hidden'] or len(archinstall.storage['_guided_hidden']['root_pw'].strip()) == 0:
- # sudo = True
-
- if 'root_pw' in archinstall.storage['_guided_hidden'] and archinstall.storage['_guided_hidden']['root_pw']:
- installation.user_set_pw('root', archinstall.storage['_guided_hidden']['root_pw'])
+ if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
+ installation.user_set_pw('root', root_pw)
ask_user_questions()