diff options
author | Jesse Keating <jkeating@redhat.com> | 2012-10-05 15:25:53 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2012-10-09 10:41:55 -0700 |
commit | 7747f07b8d45e67a655c398c95277ac595688093 (patch) | |
tree | 1bd137ccf9903bec324d28b5219e641208cd183a | |
parent | 363cd5c7c4315427644ea84f5508c5967eb4619d (diff) | |
download | anaconda-7747f07b8d45e67a655c398c95277ac595688093.tar.gz anaconda-7747f07b8d45e67a655c398c95277ac595688093.tar.xz anaconda-7747f07b8d45e67a655c398c95277ac595688093.zip |
Require root password spoke be visited (#859069)
Give up on getting cute with payload data to set required or not, just
always make the user visit it. Also don't default the kickstart data to
locked, that can confuse the UI
-rw-r--r-- | data/interactive-defaults.ks | 1 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/password.py | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks index 0046cc3f2..f692ccdc8 100644 --- a/data/interactive-defaults.ks +++ b/data/interactive-defaults.ks @@ -2,4 +2,3 @@ # This is not loaded if a kickstart file is provided on the command line. auth --enableshadow --passalgo=sha512 firstboot --enable -rootpw --lock diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py index 9f5d4d93f..74acd4e3a 100644 --- a/pyanaconda/ui/gui/spokes/password.py +++ b/pyanaconda/ui/gui/spokes/password.py @@ -55,8 +55,6 @@ class PasswordSpoke(NormalSpoke): def initialize(self): NormalSpoke.initialize(self) - # Set the rootpw to locked by default, setting a password is optional - self.data.rootpw.lock = True # place holders for the text boxes self.pw = self.builder.get_object("pw") self.confirm = self.builder.get_object("confirm") @@ -77,10 +75,12 @@ class PasswordSpoke(NormalSpoke): def status(self): if self._error: return _("Error setting root password") + if self.data.rootpw.password: + return _("Root password is set") elif self.data.rootpw.lock: return _("Root account is disabled") else: - return _("Root password is set") + return _("Root password is not set") def apply(self): if self._password: @@ -95,11 +95,7 @@ class PasswordSpoke(NormalSpoke): @property def completed(self): - # FUTURE -- update completed to false if package payload doesn't - # include firstboot and some environment to run it in - # We are by default complete, but locked. If a user attempts to set - # a password but fails, then we are no longer complete. - return not self._error + return bool(self.data.rootpw.password or self.data.rootpw.lock) def _validatePassword(self): # Do various steps to validate the password |