Corrected some spelling errors and wrong variables.
This commit is contained in:
parent
c897421e1d
commit
37b1e61828
|
|
@ -31,7 +31,7 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri
|
||||||
raise UserError("No superuser was created.")
|
raise UserError("No superuser was created.")
|
||||||
|
|
||||||
password = get_password(prompt=f'Password for user {new_user}: ')
|
password = get_password(prompt=f'Password for user {new_user}: ')
|
||||||
return {new_user: password}
|
return {new_user: {"!password" : password}}
|
||||||
|
|
||||||
def ask_for_additional_users(prompt='Any additional users to install (leave blank for no users): '):
|
def ask_for_additional_users(prompt='Any additional users to install (leave blank for no users): '):
|
||||||
users = {}
|
users = {}
|
||||||
|
|
@ -44,9 +44,9 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan
|
||||||
password = get_password(prompt=f'Password for user {new_user}: ')
|
password = get_password(prompt=f'Password for user {new_user}: ')
|
||||||
|
|
||||||
if input("Should this user be a sudo (super) user (y/N): ").strip(' ').lower() in ('y', 'yes'):
|
if input("Should this user be a sudo (super) user (y/N): ").strip(' ').lower() in ('y', 'yes'):
|
||||||
super_users[new_user] = password
|
super_users[new_user] = {"!password" : password}
|
||||||
else:
|
else:
|
||||||
users[new_user] = password
|
users[new_user] = {"!password" : password}
|
||||||
|
|
||||||
return users, super_users
|
return users, super_users
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -308,15 +308,11 @@ def perform_installation(device, boot_partition, language, mirrors):
|
||||||
if archinstall.arguments.get('profile', None):
|
if archinstall.arguments.get('profile', None):
|
||||||
installation.install_profile(archinstall.arguments.get('profile', None))
|
installation.install_profile(archinstall.arguments.get('profile', None))
|
||||||
|
|
||||||
if archinstall.arguments.get('users', None):
|
for user, user_info in archinstall.arguments.get('users', {}).items():
|
||||||
for user in archinstall.arguments.get('users'):
|
installation.user_create(user, user_info["!password"], sudo=False)
|
||||||
password = users[user]
|
|
||||||
installation.user_create(user, password, sudo=False)
|
|
||||||
if archinstall.arguments.get('superusers', None):
|
|
||||||
for user in archinstall.arguments.get('users'):
|
|
||||||
password = users[user]
|
|
||||||
installation.user_create(user, password, sudo=Tru)
|
|
||||||
|
|
||||||
|
for superuser, user_info in archinstall.arguments.get('superusers', {}).items():
|
||||||
|
installation.user_create(superuser, user_info["!password"], sudo=True)
|
||||||
|
|
||||||
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
|
||||||
installation.user_set_pw('root', root_pw)
|
installation.user_set_pw('root', root_pw)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue