[PATCH 3/3] Refer to installation not kickstart in the Initial Setup (#963968)
Vratislav Podzimek
vpodzime at redhat.com
Tue May 28 13:15:58 UTC 2013
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/spokes/password.py | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index 7cd6e49..0092448 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -24,6 +24,7 @@ from gi.repository import Gtk
from pyanaconda.i18n import _, N_
from pyanaconda.users import cryptPassword, validatePassword
+from pyanaconda import flags
from pwquality import PWQError
from pyanaconda.ui.gui.spokes import NormalSpoke
@@ -59,9 +60,15 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
self.confirm = self.builder.get_object("confirm")
self._kickstarted = self.data.rootpw.seen
- if self._kickstarted and self.rootpw.password:
- self.pw.set_placeholder_text(_("The password was set by kickstart."))
- self.confirm.set_placeholder_text(_("The password was set by kickstart."))
+ if self.data.rootpw.password:
+ if self._in_initial_setup:
+ msg = _("The password was set in the installation.")
+ self.pw.set_placeholder_text(msg)
+ self.confirm.set_placeholder_text(msg)
+ elif self._kickstarted:
+ msg = _("The password was set by kickstart.")
+ self.pw.set_placeholder_text(msg)
+ self.confirm.set_placeholder_text(msg)
def refresh(self):
# self.setCapsLockLabel()
@@ -76,9 +83,18 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
# self.capslock..set_text("")
@property
+ def _in_initial_setup(self):
+ return self._kickstarted and flags.flags.initialSetup
+
+ @property
def status(self):
if self._error:
return _("Error setting root password")
+ elif self._in_initial_setup:
+ if self.data.rootpw.password:
+ return _("Root password was set in the installation")
+ elif self.data.rootpw.lock:
+ return _("Root account was disabled in the installation")
elif self._kickstarted:
if self.data.rootpw.password:
return _("Root password was set by kickstart")
--
1.7.11.7
More information about the anaconda-patches
mailing list