Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-05-05 13:56:24 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-05-05 13:56:24 +0200
commita0947f527aa1b8c2df5500a1b7250ee9e5d5f398 (patch)
treeb9a9e2d55ce65f6d882e3cb762b2aa2f3140121a /examples
parent469ab8d15ab391705e8aa00d911f6daeee8345f6 (diff)
Allow for multiple disks to be selected (to span partitions such as boot across multiple block devices)
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 5e75d850..05e04ce0 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -36,17 +36,24 @@ def ask_user_questions():
archinstall.arguments['mirror-region'] = archinstall.select_mirror_regions(archinstall.list_mirrors())
break
except archinstall.RequirementError as e:
- archinstall.log(e, fg="red")
+ archinstall.log(e, fg="red")
else:
selected_region = archinstall.arguments['mirror-region']
archinstall.arguments['mirror-region'] = {selected_region : archinstall.list_mirrors()[selected_region]}
- # Ask which harddrive/block-device we will install to
- if archinstall.arguments.get('harddrive', None):
- archinstall.arguments['harddrive'] = archinstall.BlockDevice(archinstall.arguments['harddrive'])
+ # Ask which harddrives/block-devices we will install to
+ # and convert them into archinstall.BlockDevice() objects.
+ if archinstall.arguments.get('harddrives', None):
+ archinstall.arguments['harddrives'] = [archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.arguments['harddrives']]
else:
- archinstall.arguments['harddrive'] = archinstall.select_disk(archinstall.all_disks())
+ archinstall.arguments['harddrives'] = [
+ archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.generic_multi_select(archinstall.all_disks(),
+ text="Select one or more harddrives to use and configure (leave blank to skip this step): "
+ allow_empty=True)
+ ]
+
+
# Perform a quick sanity check on the selected harddrive.
# 1. Check if it has partitions