anaconda: Make sure that a user is created at installation time

This way, Qubes OS-specific initial-setup procedures will always have
a user to work with.
This commit is contained in:
M. Vefa Bicakci 2016-04-10 00:00:00 -04:00
parent ed17da5dc6
commit fd37700c14
No known key found for this signature in database
GPG Key ID: 1DF87CE3B3A5DFAF
2 changed files with 4 additions and 13 deletions

View File

@ -29,7 +29,6 @@ from pyanaconda.users import cryptPassword, validatePassword, guess_username
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.categories.user_settings import UserSettingsCategory
from pyanaconda.ui.common import FirstbootSpokeMixIn
from pyanaconda.ui.helpers import InputCheck
from pyanaconda.ui.gui.helpers import GUISpokeInputCheckHandler, GUIDialogInputCheckHandler
@ -224,7 +223,7 @@ class AdvancedUserDialog(GUIObject, GUIDialogInputCheckHandler):
return False
class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
class UserSpoke(NormalSpoke, GUISpokeInputCheckHandler):
"""
.. inheritance-diagram:: UserSpoke
:parts: 3
@ -380,10 +379,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
@property
def mandatory(self):
""" Only mandatory if the root pw hasn't been set in the UI
eg. not mandatory if the root account was locked in a kickstart
"""
return not self.data.rootpw.password and not self.data.rootpw.lock
return True
def apply(self):
# set the password only if the user enters anything to the text entry

View File

@ -23,7 +23,6 @@
from pyanaconda.ui.categories.user_settings import UserSettingsCategory
from pyanaconda.ui.tui.spokes import EditTUISpoke
from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry
from pyanaconda.ui.common import FirstbootSpokeMixIn
from pyanaconda.users import guess_username
from pyanaconda.flags import flags
from pyanaconda.i18n import N_, _
@ -33,7 +32,7 @@ from pyanaconda.regexes import GECOS_VALID, USERNAME_VALID, GROUPLIST_SIMPLE_VAL
__all__ = ["UserSpoke"]
class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke):
class UserSpoke(EditTUISpoke):
"""
.. inheritance-diagram:: UserSpoke
:parts: 3
@ -67,7 +66,6 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke):
return False
def __init__(self, app, data, storage, payload, instclass):
FirstbootSpokeMixIn.__init__(self)
EditTUISpoke.__init__(self, app, data, storage, payload, instclass, "user")
self.dialog.wrong_input_message = _("You have provided an invalid user name.\n"
"Tip: Keep your user name shorter than 32 "
@ -115,10 +113,7 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke):
@property
def mandatory(self):
""" Only mandatory if the root pw hasn't been set in the UI
eg. not mandatory if the root account was locked in a kickstart
"""
return not self.data.rootpw.password and not self.data.rootpw.lock
return True
@property
def status(self):