Cleaned up guided.py further by stream-lining the profiles and NIC configuration.
This commit is contained in:
parent
572d59e560
commit
03a69eba2e
|
|
@ -180,27 +180,19 @@ archinstall.arguments['superusers'] = {**archinstall.arguments['superusers'], **
|
||||||
|
|
||||||
# Ask for archinstall-specific profiles (such as desktop environments etc)
|
# Ask for archinstall-specific profiles (such as desktop environments etc)
|
||||||
if not archinstall.arguments.get('profile', None):
|
if not archinstall.arguments.get('profile', None):
|
||||||
while 1:
|
archinstall.arguments['profile'] = archinstall.select_profile(archinstall.list_profiles())
|
||||||
profile = archinstall.select_profile(archinstall.list_profiles())
|
else:
|
||||||
print(profile)
|
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]
|
||||||
if profile:
|
|
||||||
archinstall.storage['_guided']['profile'] = profile
|
|
||||||
|
|
||||||
if type(profile) != str: # Got a imported profile
|
# Check the potentially selected profiles preperations to get early checks if some additional questions are needed.
|
||||||
archinstall.storage['_guided']['profile'] = profile[0] # The second return is a module, and not a handle/object.
|
if archinstall.arguments['profile']:
|
||||||
if not profile[1]._prep_function():
|
if not archinstall.arguments['profile']._prep_function():
|
||||||
# TODO: See how we can incorporate this into
|
archinstall.log(
|
||||||
# the general log flow. As this is pre-installation
|
' * Profile\'s preparation requirements was not fulfilled.',
|
||||||
# session setup. Which creates the installation.log file.
|
bg='black',
|
||||||
archinstall.log(
|
fg='red'
|
||||||
' * Profile\'s preparation requirements was not fulfilled.',
|
)
|
||||||
bg='black',
|
exit(1)
|
||||||
fg='red'
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
# Additional packages (with some light weight error handling for invalid package names)
|
# Additional packages (with some light weight error handling for invalid package names)
|
||||||
if not archinstall.arguments.get('packages', None):
|
if not archinstall.arguments.get('packages', None):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue