In the linux installer, when the username and password are already provided via command line flags (--username, --password) the interactive prompt should either:
- be totally skipped (my preference)
- or dialog must be prepopulated with the known values
See function __get_username_password
|
def __get_username_password(self) -> None: |
|
""" |
|
read user password and set the password property |
|
do nothing if silent mode is set |
|
""" |
|
if self.silent: |
|
return |
|
if self.graphics in ('tkinter', 'zenity', 'yad'): |
|
self.__get_username_password_atomic() |
|
else: |
|
password = "a" |
|
password1 = "b" |
|
if self.username: |
|
user_prompt = self.username |
|
elif Config.hint_user_input: |
|
user_prompt = '@' + Config.user_realm |
|
else: |
|
user_prompt = '' |
|
while True: |
|
self.username = self.prompt_nonempty_string( |
|
1, Messages.username_prompt, user_prompt) |
|
if self.__validate_user_name(): |
|
break |
|
while password != password1: |
|
password = self.prompt_nonempty_string( |
|
0, Messages.enter_password) |
|
password1 = self.prompt_nonempty_string( |
|
0, Messages.repeat_password) |
|
if password != password1: |
|
self.alert(Messages.passwords_differ) |
|
self.password = password |
In the linux installer, when the username and password are already provided via command line flags (
--username,--password) the interactive prompt should either:See function
__get_username_passwordCAT/devices/linux/Files/main.py
Lines 653 to 683 in 69fea3a