index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-02-17 12:24:56 +0100 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-02-17 12:24:56 +0100 |
commit | 5cb3b0d176fff9d2c2fb814530b29eca5819fe8e (patch) | |
tree | b1a71fb7efd808979107356bbd26389487eb4670 /archinstall | |
parent | 3a8a25982a273081cd845723a2d794438e960a13 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 4 | ||||
-rw-r--r-- | archinstall/lib/user_interaction.py | 10 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index aa3632d8..d76c6d7e 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -23,6 +23,10 @@ class BlockDevice(): self.path = path self.info = info self.part_cache = OrderedDict() + # TODO: Currently disk encryption is a BIT missleading. + # It's actually partition-encryption, but for future-proofing this + # I'm placing the encryption password on a BlockDevice level. + self.encryption_passwoed = None def __repr__(self, *args, **kwargs): return f"BlockDevice({self.device})" diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index fdbabe96..f92cd008 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -1,10 +1,20 @@ +import getpass from .exceptions import * from .profiles import Profile from .locale_helpers import search_keyboard_layout +from .output import log ## TODO: Some inconsistencies between the selection processes. ## Some return the keys from the options, some the values? +def get_password(prompt="Enter a password: "): + while (passwd := getpass.getpass(prompt)): + passwd_verification = getpass.getpass(prompt='And one more time for verification: ') + if passwd != passwd_verification: + log(' * Passwords did not match * ', bg='black', fg='red') + continue + return passwd + def generic_select(options, input_text="Select one of the above by index or absolute value: ", sort=True): """ A generic select function that does not output anything |