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>2021-11-24 20:52:38 +0000
committerGitHub <noreply@github.com>2021-11-24 21:52:38 +0100
commitbf9d53ae0b0178630688e27bc89fbb0db774fbb2 (patch)
treebb6320b53c4fb998aacd3865ee62b12430c0d569 /archinstall/lib/installer.py
parent070d088462aeabdc4e62893829a024b5a36b5e00 (diff)
Removed silent 'ok' on mkdir and path for chmod on crypttab setup (#768)
* Removed silent 'ok' on mkdir for encryption key dir * Fixed chmod path during crypttab setup
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 584a14e7..4b26d979 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -197,7 +197,7 @@ class Installer:
with (luks_handle := luks2(partition['device_instance'], loopdev, password, auto_unmount=False)) as unlocked_device:
if partition.get('generate-encryption-key-file'):
if not (cryptkey_dir := pathlib.Path(f"{self.target}/etc/cryptsetup-keys.d")).exists():
- cryptkey_dir.mkdir(parents=True, exist_ok=True)
+ cryptkey_dir.mkdir(parents=True)
# Once we store the key as ../xyzloop.key systemd-cryptsetup can automatically load this key
# if we name the device to "xyzloop".
@@ -205,7 +205,7 @@ class Installer:
with open(f"{self.target}{encryption_key_path}", "w") as keyfile:
keyfile.write(generate_password(length=512))
- os.chmod(encryption_key_path, 0o400)
+ os.chmod(f"{self.target}{encryption_key_path}", 0o400)
luks_handle.add_key(pathlib.Path(f"{self.target}{encryption_key_path}"), password=password)
luks_handle.crypttab(self, encryption_key_path, options=["luks", "key-slot=1"])