From 3f8f0020f5ee8985806b1b62c8826f113ee9df51 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 9 Mar 2021 16:22:36 +0100 Subject: Purged last legacy, setting the root pw --- examples/guided.py | 14 ++------------ 1 file 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() -- cgit v1.2.3-54-g00ecf