index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-03-09 12:10:30 +0100 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-03-09 12:10:30 +0100 |
commit | 585e0f4b869c270ec0482d628033463af74516a7 (patch) | |
tree | d40047e89bb1b44cfb916e31551a37f2380748c3 | |
parent | b3a5afea60ada944905b45a7150c91a5a8a09fcc (diff) |
-rw-r--r-- | archinstall/lib/luks.py | 14 |
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index 7c5d3e55..706a8bd9 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -15,7 +15,7 @@ class luks2(): self.key_file = key_file self.auto_unmount = auto_unmount self.filesystem = 'crypto_LUKS' - self.mappoint = None + self.mapdev = None def __enter__(self): #if self.partition.allow_formatting: @@ -83,15 +83,17 @@ class luks2(): os.path.basename(mountpoint) # TODO: Raise exception instead? 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.mappoint = f'/dev/mapper/{mountpoint}' - return Partition(f'/dev/mapper/{mountpoint}', encrypted=True, filesystem=get_filesystem_type(f'/dev/mapper/{mountpoint}')) + self.mapdev = f'/dev/mapper/{mountpoint}' + inner_fs = get_filesystem_type(self.mapdev) + print('Inner FS:', inner_fs) + return Partition(self.mapdev, encrypted=True, filesystem=inner_fs) def close(self, mountpoint=None): if not mountpoint: - mountpoint = self.mappoint + mountpoint = self.mapdev - sys_command(f'/usr/bin/cryptsetup close {self.mappoint}') - return os.path.islink(self.mappoint) is False + sys_command(f'/usr/bin/cryptsetup close {self.mapdev}') + return os.path.islink(self.mapdev) is False def format(self, path): if (handle := sys_command(f"/usr/bin/cryptsetup -q -v luksErase {path}")).exit_code != 0: |