index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-11-08 10:57:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 10:57:20 +0100 |
commit | 16c98e8102d7de3622cf6db5d19b022386e98474 (patch) | |
tree | ef51702a7a55a38a1a710c4d3ca0c7d4c9069465 /archinstall/lib/luks.py | |
parent | 269a5fb2b98fe64477cc9e08068df6751a2a8191 (diff) | |
parent | ee9af976ca700f96480f2f1396ed861d78013204 (diff) |
-rw-r--r-- | archinstall/lib/luks.py | 7 |
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index d4ee6632..7dfa9edc 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -2,6 +2,8 @@ import os from .exceptions import * from .general import * from .disk import Partition +from .output import log, LOG_LEVELS +from .storage import storage class luks2(): def __init__(self, partition, mountpoint, password, *args, **kwargs): @@ -22,7 +24,10 @@ class luks2(): return True def encrypt(self, partition, password, key_size=512, hash_type='sha512', iter_time=10000, key_file=None): - log(f'Encrypting {partition}') + # TODO: We should be able to integrate this into the main log some how. + # Perhaps post-mortem? + log(f'Encrypting {partition}', level=LOG_LEVELS.Info, file=storage.get('logfile', None)) + if not key_file: key_file = f"/tmp/{os.path.basename(self.partition.path)}.disk_pw" # TODO: Make disk-pw-file randomly unique? if type(password) != bytes: password = bytes(password, 'UTF-8') |