Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 13:32:48 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 13:32:48 +0100
commitd84f4e2bf9bbba01cbab0e9c569af4e054b2d73a (patch)
tree3c3ed66f57487623a0e1c7fc49e40ec709d4b24d /archinstall.py
parent62ecb7ccfa43150d756961c1e5ac45a9dd805cfe (diff)
Fixed an issue where --profile didn't override the network deploy.
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/archinstall.py b/archinstall.py
index 9d96d439..ce76ccba 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -1158,26 +1158,27 @@ if __name__ == '__main__':
args = setup_args_defaults(args)
## == If we got networking,
- # Try fetching instructions for this box and execute them.
- instructions = load_automatic_instructions()
+ # Try fetching instructions for this box unless a specific profile was given, and execute them.
+ if args['profile'] is None:
+ instructions = load_automatic_instructions()
- if args['profile'] and not args['default']:
+ elif args['profile'] and not args['default']:
instructions = get_instructions(args['profile'])
if len(instructions) <= 0:
print('[E] No instructions by the name of {} was found.'.format(args['profile']))
print(' Installation won\'t continue until a valid profile is given.')
print(' (this is because --profile was given and a --default is not given)')
exit(1)
- else:
- first = True
- while not args['default'] and not args['profile'] and len(instructions) <= 0:
- profile = input('What template do you want to install: ')
- instructions = get_instructions(profile)
- if first and len(instructions) <= 0:
- print('[E] No instructions by the name of {} was found.'.format(profile))
- print(' Installation won\'t continue until a valid profile is given.')
- print(' (this is because --default is not instructed and no --profile given)')
- first = False
+
+ first = True
+ while not args['default'] and not args['profile'] and len(instructions) <= 0:
+ profile = input('What template do you want to install: ')
+ instructions = get_instructions(profile)
+ if first and len(instructions) <= 0:
+ print('[E] No instructions by the name of {} was found.'.format(profile))
+ print(' Installation won\'t continue until a valid profile is given.')
+ print(' (this is because --default is not instructed and no --profile given)')
+ first = False
# TODO: Might not need to return anything here, passed by reference?
instructions = merge_in_includes(instructions)