Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-09 22:19:40 +0100
committerAnton Hvornum <anton@hvornum.se>2021-11-09 22:19:40 +0100
commitdf59809206e74b7236cce805437a02688711b121 (patch)
tree0343d7f9a34ceb0a2fd2b446e9ac6788d1d4791f
parent4b4c66caa1a5f896e44e679e4e1afef5caa657e0 (diff)
Changed partition password to !password
And also added a check to grab !encryption-password if no partition-specific password was given.
-rw-r--r--archinstall/lib/disk/filesystem.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 4d137163..512d440f 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -94,15 +94,17 @@ class Filesystem:
if partition.get('filesystem', {}).get('format', False):
if partition.get('encrypted', False):
- if not partition.get('password'):
+ if not partition.get('!password') and not storage['arguments'].get('!encryption-password'):
if storage['arguments'] == 'silent':
raise ValueError(f"Missing encryption password for {partition['device_instance']}")
else:
from ..user_interaction import get_password
- partition['password'] = get_password(f"Enter a encryption password for {partition['device_instance']}")
+ partition['!password'] = get_password(f"Enter a encryption password for {partition['device_instance']}")
+ elif not partition.get('!password') and storage['arguments'].get('!encryption-password'):
+ partition['!password'] = storage['arguments']['!encryption-password']
- partition['device_instance'].encrypt(password=partition['password'])
- with luks2(partition['device_instance'], storage.get('ENC_IDENTIFIER', 'ai') + 'loop', partition['password']) as unlocked_device:
+ partition['device_instance'].encrypt(password=partition['!password'])
+ with luks2(partition['device_instance'], storage.get('ENC_IDENTIFIER', 'ai') + 'loop', partition['!password']) as unlocked_device:
if not partition.get('format'):
if storage['arguments'] == 'silent':
raise ValueError(f"Missing fs-type to format on newly created encrypted partition {partition['device_instance']}")