Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-08-28 22:04:25 +0200
committerGitHub <noreply@github.com>2022-08-28 22:04:25 +0200
commit13703fbb04d7bc7975368b035342e104c26e3f35 (patch)
treefad90fef6678180dfbf0062cc4a357a92fca4ea6 /archinstall/lib/installer.py
parent65212a46aa43fadb2b0ee88b46b573765d7be9f9 (diff)
Fix permission flags on all the log files created (#1440)
* Changed permissions on the logs stored in /var/log/archinstall. Also cleaned up one of the saves to have the same syntax as the others * Tweaked secondary encryption password detection logic, as it wouldn't take it from the main arguments[] otherwise. * Changed permission on cmd_output.txt * Changed permission on cmd_history.txt
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 0f298eba..a8346cb6 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -246,11 +246,12 @@ class Installer:
# we manage the encrypted partititons
for partition in [entry for entry in list_part if entry.get('encrypted', False)]:
# open the luks device and all associate stuff
- if not (password := partition.get('!password', None)):
- raise RequirementError(f"Missing partition {partition['device_instance'].path} encryption password in layout: {partition}")
- loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['mountpoint']).name}loop"
- else:
- loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}"
+ if not (password := partition.get('!password', None)) and storage['arguments'].get('!encryption-password'):
+ password = storage['arguments'].get('!encryption-password')
+ elif not password:
+ raise RequirementError(f"Missing partition encryption password in layout: {partition}")
+
+ loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}"
# note that we DON'T auto_unmount (i.e. close the encrypted device so it can be used
with (luks_handle := luks2(partition['device_instance'], loopdev, password, auto_unmount=False)) as unlocked_device: