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-03-08 16:18:56 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-03-08 16:18:56 +0100
commit0b3879ac58d2896ad01270f835fc2819817c6fc1 (patch)
treeae3efc3e53059d2bf74be4879f41e7c5ff47134a /examples
parent979d162551d0796f4cbefd7a450149896e094caf (diff)
Removing part of the old formatting scheme. New implementation roughly 80% done.
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/examples/guided.py b/examples/guided.py
index e9ceae19..7aec0611 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -271,19 +271,17 @@ signal.signal(signal.SIGINT, original_sigint_handler)
Once that's done, we'll hand over to perform_installation()
"""
with archinstall.Filesystem(archinstall.arguments['harddrive'], archinstall.GPT) as fs:
- for partition in archinstall.arguments['harddrive']:
- print(partition)
- exit(0)
- # Use partitioning helper to set up the disk partitions.
- if disk_password:
- fs.use_entire_disk('luks2')
+ if archinstall.arguments['harddrive'].keep_partitions is False:
+ if disk_password:
+ fs.use_entire_disk('luks2')
+ else:
+ fs.use_entire_disk('ext4')
else:
- fs.use_entire_disk('ext4')
-
- if harddrive.partition[1].size == '512M':
- raise OSError('Trying to encrypt the boot partition for petes sake..')
- harddrive.partition[0].format('vfat')
-
+ for partition in archinstall.arguments['harddrive']:
+ if partition.allow_formatting:
+ partition.format()
+
+ exit(0)
if disk_password:
# First encrypt and unlock, then format the desired partition inside the encrypted part.
# archinstall.luks2() encrypts the partition when entering the with context manager, and