if not archinstall.arguments.get('!root-password', None): archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (Recommendation: leave blank to leave root disabled): ') # Ask for additional users (super-user if root pw was not set) archinstall.arguments['users'] = {} archinstall.arguments['superusers'] = {} if not archinstall.arguments.get('!root-password', None): archinstall.arguments['superusers'] = archinstall.ask_for_superuser_account('Create a required super-user with sudo privileges: ', forced=True) users, superusers = archinstall.ask_for_additional_users('Enter a username to create a additional user (leave blank to skip & continue): ') archinstall.arguments['users'] = users archinstall.arguments['superusers'] = {**archinstall.arguments['superusers'], **superusers} # Ask for archinstall-specific profiles (such as desktop environments etc) if not archinstall.arguments.get('profile', None): archinstall.arguments['profile'] = archinstall.select_profile(filter(lambda profile: (Profile(None, profile).is_top_level_profile()), archinstall.list_profiles())) else: archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']] # Check the potentially selected profiles preparations to get early checks if some additional questions are needed. if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_prep_function(): with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported: if not imported._prep_function(): archinstall.log( ' * Profile\'s preparation requirements was not fulfilled.', fg='red' ) exit(1) # Ask about audio server selection if one is not already set if not archinstall.arguments.get('audio', None):
users, superusers = archinstall.ask_for_additional_users( 'Enter a username to create a additional user (leave blank to skip & continue): ' ) archinstall.arguments['users'] = users archinstall.arguments['superusers'] = { **archinstall.arguments['superusers'], **superusers } # Ask for archinstall-specific profiles (such as desktop environments etc) if not archinstall.arguments.get('profile', None): archinstall.arguments['profile'] = archinstall.select_profile( filter( lambda profile: (Profile(None, profile).is_top_level_profile()), archinstall.list_profiles())) else: archinstall.arguments['profile'] = archinstall.list_profiles()[ archinstall.arguments['profile']] # Check the potentially selected profiles preparations to get early checks if some additional questions are needed. if archinstall.arguments['profile'] and archinstall.arguments[ 'profile'].has_prep_function(): with archinstall.arguments['profile'].load_instructions( namespace=f"{archinstall.arguments['profile'].namespace}.py" ) as imported: if not imported._prep_function(): archinstall.log( ' * Profile\'s preparation requirements was not fulfilled.', fg='red')
# Ask for additional users (super-user if root pw was not set) archinstall.arguments['users'] = {} archinstall.arguments['superusers'] = {} if not archinstall.arguments.get('!root-password', None): archinstall.arguments['superusers'] = archinstall.ask_for_superuser_account('Create a required super-user with sudo privileges: ', forced=True) users, superusers = archinstall.ask_for_additional_users('Enter a username to create a additional user (leave blank to skip & continue): ') archinstall.arguments['users'] = users archinstall.arguments['superusers'] = {**archinstall.arguments['superusers'], **superusers} # Ask for archinstall-specific profiles (such as desktop environments etc) if not archinstall.arguments.get('profile', None): archinstall.arguments['profile'] = archinstall.select_profile() else: archinstall.arguments['profile'] = Profile(installer=None, path=archinstall.arguments['profile']) # Check the potentially selected profiles preparations to get early checks if some additional questions are needed. if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_prep_function(): with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported: if not imported._prep_function(): archinstall.log(' * Profile\'s preparation requirements was not fulfilled.', fg='red') exit(1) # Ask about audio server selection if one is not already set if not archinstall.arguments.get('audio', None): # The argument to ask_for_audio_selection lets the library know if it's a desktop profile archinstall.arguments['audio'] = archinstall.ask_for_audio_selection(is_desktop_profile(archinstall.arguments['profile'])) # Ask for preferred kernel: if not archinstall.arguments.get("kernels", None):