index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-11-24 20:52:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 21:52:38 +0100 |
commit | bf9d53ae0b0178630688e27bc89fbb0db774fbb2 (patch) | |
tree | bb6320b53c4fb998aacd3865ee62b12430c0d569 /archinstall/lib/installer.py | |
parent | 070d088462aeabdc4e62893829a024b5a36b5e00 (diff) |
-rw-r--r-- | archinstall/lib/installer.py | 4 |
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"]) |