Blob Blame History Raw
diff -up plymouth-0.8.9/src/main.c.sysfs-tty-fix plymouth-0.8.9/src/main.c
--- plymouth-0.8.9/src/main.c.sysfs-tty-fix	2014-02-20 13:30:12.391455465 -0500
+++ plymouth-0.8.9/src/main.c	2014-02-20 13:29:43.673747888 -0500
@@ -1980,6 +1980,7 @@ add_display_and_keyboard_for_console (co
 
 static int
 add_consoles_from_file (state_t         *state,
+                        const char      *default_tty,
                         ply_hashtable_t *consoles,
                         const char      *path)
 {
@@ -1988,7 +1989,6 @@ add_consoles_from_file (state_t
   ssize_t contents_length;
   int num_consoles;
   const char *remaining_file_contents;
-
   ply_trace ("opening %s", path);
   fd = open (path, O_RDONLY);
 
@@ -2009,6 +2009,8 @@ add_consoles_from_file (state_t
     }
   close (fd);
 
+  ply_trace ("kernel reports active consoles are '%s'", contents);
+
   remaining_file_contents = contents;
   num_consoles = 0;
 
@@ -2034,18 +2036,26 @@ add_consoles_from_file (state_t
       console_length = strcspn (remaining_file_contents, " \n\t\v");
       console = strndup (remaining_file_contents, console_length);
 
-      /* If this console is anything besides tty0, then the user is sort
-       * of a weird case (uses a serial console or whatever) and they
-       * most likely don't want a graphical splash, so force details.
-       */
-      if (strcmp (console, "tty0") != 0)
-        state->should_force_details = true;
-
       asprintf (&console_device, "/dev/%s", console);
 
+      /* If this console is anything besides tty0 or the default tty, then
+       * the user is sort of a weird case (uses a serial console or whatever)
+       * and they most likely don't want a graphical splash, so force details.
+       */
+      if (!state->should_force_details &&
+          (strcmp (console, "tty0") != 0) &&
+          (strcmp (console_device, default_tty) != 0))
+        {
+          ply_trace ("forcing details because serial console %s found!", console_device);
+          state->should_force_details = true;
+        }
+      else
+        {
+          ply_trace ("local console %s found!", console_device);
+        }
+
       free (console);
 
-      ply_trace ("console %s found!", console_device);
       ply_hashtable_insert (consoles, console_device, console_device);
       num_consoles++;
 
@@ -2135,7 +2145,7 @@ check_for_consoles (state_t    *state,
 
   if (!ignore_serial_consoles)
     {
-      num_consoles = add_consoles_from_file (state, consoles, "/sys/class/tty/console/active");
+      num_consoles = add_consoles_from_file (state, default_tty, consoles, "/sys/class/tty/console/active");
 
       if (num_consoles == 0)
         {