commit
5e3a152364
|
|
@ -142,7 +142,8 @@ class Partition():
|
||||||
self.target_mountpoint = mountpoint
|
self.target_mountpoint = mountpoint
|
||||||
self.filesystem = filesystem
|
self.filesystem = filesystem
|
||||||
self.size = size # TODO: Refresh?
|
self.size = size # TODO: Refresh?
|
||||||
self._encrypted = encrypted
|
self._encrypted = None
|
||||||
|
self.encrypted = encrypted
|
||||||
self.allow_formatting = False # A fail-safe for unconfigured partitions, such as windows NTFS partitions.
|
self.allow_formatting = False # A fail-safe for unconfigured partitions, such as windows NTFS partitions.
|
||||||
|
|
||||||
if mountpoint:
|
if mountpoint:
|
||||||
|
|
@ -161,7 +162,7 @@ class Partition():
|
||||||
self.filesystem = fstype
|
self.filesystem = fstype
|
||||||
|
|
||||||
if self.filesystem == 'crypto_LUKS':
|
if self.filesystem == 'crypto_LUKS':
|
||||||
self._encrypted = True
|
self.encrypted = True
|
||||||
|
|
||||||
def __lt__(self, left_comparitor):
|
def __lt__(self, left_comparitor):
|
||||||
if type(left_comparitor) == Partition:
|
if type(left_comparitor) == Partition:
|
||||||
|
|
@ -269,6 +270,11 @@ class Partition():
|
||||||
if allow_formatting is None:
|
if allow_formatting is None:
|
||||||
allow_formatting = self.allow_formatting
|
allow_formatting = self.allow_formatting
|
||||||
|
|
||||||
|
# To avoid "unable to open /dev/x: No such file or directory"
|
||||||
|
start_wait = time.time()
|
||||||
|
while pathlib.Path(path).exists() is False and time.time() - start_wait < 10:
|
||||||
|
time.sleep(0.025)
|
||||||
|
|
||||||
if not allow_formatting:
|
if not allow_formatting:
|
||||||
raise PermissionError(f"{self} is not formatable either because instance is locked ({self.allow_formatting}) or a blocking flag was given ({allow_formatting})")
|
raise PermissionError(f"{self} is not formatable either because instance is locked ({self.allow_formatting}) or a blocking flag was given ({allow_formatting})")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ def ask_user_questions():
|
||||||
|
|
||||||
# Get disk encryption password (or skip if blank)
|
# Get disk encryption password (or skip if blank)
|
||||||
if not archinstall.arguments.get('!encryption-password', None):
|
if not archinstall.arguments.get('!encryption-password', None):
|
||||||
if passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): '):
|
if (passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')).strip():
|
||||||
archinstall.arguments['!encryption-password'] = passwd
|
archinstall.arguments['!encryption-password'] = passwd
|
||||||
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']
|
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue