index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-08 19:51:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 19:51:05 +0000 |
commit | ef89010efe3ddd968a5b3413a739366bc534f5a3 (patch) | |
tree | 5b2322c52c431f574b251d312f833da0aa8a2a11 /archinstall/lib/luks.py | |
parent | 154e048179daad9c3a6b420a48d48509fb800ac7 (diff) | |
parent | ab2a43e19faefa11809e603aa5ee9add6f6b96c0 (diff) |
-rw-r--r-- | archinstall/lib/luks.py | 7 |
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index a1d42196..b076ac9b 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -1,5 +1,7 @@ import os import shlex +import time +import pathlib from .exceptions import * from .general import * from .disk import Partition @@ -123,6 +125,11 @@ class luks2(): from .disk import get_filesystem_type if '/' in mountpoint: os.path.basename(mountpoint) # TODO: Raise exception instead? + + wait_timer = time.time() + while pathlib.Paht(partition.path).exists() is False and time.time() - wait_timer < 10: + time.sleep(0.025) + sys_command(f'/usr/bin/cryptsetup open {partition.path} {mountpoint} --key-file {os.path.abspath(key_file)} --type luks2') if os.path.islink(f'/dev/mapper/{mountpoint}'): self.mapdev = f'/dev/mapper/{mountpoint}' |