]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[configure] allow boot and shutdown ttys to be changed improved-vt-handling
authorScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 05:16:17 +0000 (05:16 +0000)
committerScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 20:01:31 +0000 (20:01 +0000)
Allow distributions like Ubuntu to override the boot and shutdown
ttys from the configure script so they don't have to patch the
source.

configure.ac
src/main.c

index fafef27345c6db2583bceeb3aa69fc3ce2ab313d..62682eefaebb75be2243e2d73be7f21fcd961e29 100644 (file)
@@ -125,6 +125,12 @@ AC_ARG_WITH(release-file, AC_HELP_STRING([--with-release-file=<path_to_release_f
 AC_SUBST(RELEASE_FILE)
 AC_DEFINE_UNQUOTED(RELEASE_FILE, "$RELEASE_FILE", [Release file path])
 
+AC_ARG_WITH(boot-tty, AC_HELP_STRING([--with-boot-tty=<tty>], [Default TTY to use in boot mode (by default tty1)]),BOOT_TTY=${withval},BOOT_TTY=/dev/tty1)
+AC_DEFINE_UNQUOTED(BOOT_TTY, "$BOOT_TTY", [TTY to use in boot mode])
+
+AC_ARG_WITH(shutdown-tty, AC_HELP_STRING([--with-shutdown-tty=<tty>], [Default TTY to use in shutdown mode (by default tty63)]),SHUTDOWN_TTY=${withval},SHUTDOWN_TTY=/dev/tty63)
+AC_DEFINE_UNQUOTED(SHUTDOWN_TTY, "$SHUTDOWN_TTY", [TTY to use in shutdown mode])
+
 # Turn on the additional warnings last, so -Werror doesn't affect other tests.
 
 AC_DEFUN([PLYMOUTH_CC_TRY_FLAG], [
index edf7289a7bce8a754c08f38f54375672244d3f20..a865a1d8197822914d6d012f785b3287297fd44c 100644 (file)
@@ -1424,10 +1424,10 @@ initialize_environment (state_t *state)
     {
       if (state->mode == PLY_MODE_SHUTDOWN)
         {
-          state->default_tty = "tty63";
+          state->default_tty = SHUTDOWN_TTY;
         }
       else
-        state->default_tty = "tty1";
+        state->default_tty = BOOT_TTY;
     }
 
   check_for_consoles (state, state->default_tty, false);