summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-01-10 10:33:14 -0500
committerRay Strode <rstrode@redhat.com>2014-01-10 14:16:36 -0500
commit76d913fd84db52730b2d3e206bd3b5ad5a6a3be4 (patch)
tree54d819ebc8c3a7b6125dc3a4be32d1204ce82a66
parent126345af8704a9b10481657d79d66cbea93e1647 (diff)
main: don't skip asking for password if splash is coming up
If the client asks for a password and we don't have a splash screen, we currently reply with a NOANSWER reply which makes the client ask for the password instead. This is so ask-for-password requests that come up when plymouthd isn't controlling the tty can be handled. These days show-splash requests are asynchronous and so a splash screen might not be around "right now" but will be around in the near future. In these cases, we really want plymouth to handle asking for the password, because it's going to take control of the tty imminently, so the client won't able able to ask for the password (and, of course, we'd rather the splash ask for the password anyway, since it's a better user experience) This commit checks if there's a looming show splash request. If there is, it avoids doing the NOANSWER reply and instead just sits tight waiting for the splash to come up and the user to enter the password.
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index fd81f724..50ccbf06 100644
--- a/src/main.c
+++ b/src/main.c
@@ -461,10 +461,16 @@ on_ask_for_password (state_t *state,
{
ply_entry_trigger_t *entry_trigger;
- /* No splash, client will have to get password
+ /* Waiting to be shown, boot splash will
+ * arrive shortly so just sit tight
*/
- if (state->boot_splash == NULL)
+ if (state->show_trigger != NULL)
+ {
+ ply_trace ("splash still coming up, waiting a bit");
+ }
+ else if (state->boot_splash == NULL)
{
+ /* No splash, client will have to get password */
ply_trace ("no splash loaded, replying immediately with no password");
ply_trigger_pull (answer, NULL);
return;