From 469ab8d15ab391705e8aa00d911f6daeee8345f6 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 4 May 2021 11:45:21 +0200 Subject: Moved around the function calls to be more logical and separated. Also moved the target-mount -> target-mountpoint as a parameter for the actual installation. --- examples/guided.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/guided.py b/examples/guided.py index 40bebabf..5e75d850 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -47,8 +47,6 @@ def ask_user_questions(): archinstall.arguments['harddrive'] = archinstall.BlockDevice(archinstall.arguments['harddrive']) else: archinstall.arguments['harddrive'] = archinstall.select_disk(archinstall.all_disks()) - if archinstall.arguments['harddrive'] is None: - archinstall.arguments['target-mount'] = '/mnt' # Perform a quick sanity check on the selected harddrive. # 1. Check if it has partitions @@ -234,7 +232,7 @@ def ask_user_questions(): archinstall.arguments['timezone'] = archinstall.ask_for_a_timezone() -def perform_installation_steps(): +def perform_filesystem_operations(): print() print('This is your chosen configuration:') archinstall.log("-- Guided template chosen (with below config) --", level=logging.DEBUG) @@ -298,9 +296,6 @@ def perform_installation_steps(): fs.find_partition('/').mount('/mnt') if hasUEFI(): fs.find_partition('/boot').mount('/mnt/boot') - - perform_installation('/mnt') - def perform_installation(mountpoint): """ @@ -392,4 +387,5 @@ def perform_installation(mountpoint): archinstall.log(f"Disk states after installing: {archinstall.disk_layouts()}", level=archinstall.LOG_LEVELS.Debug) ask_user_questions() -perform_installation_steps() \ No newline at end of file +perform_filesystem_operations() +perform_installation(archinstall.arguments.get('target-mountpoint', None)) \ No newline at end of file -- cgit v1.2.3-70-g09d2