[PATCH 21/21] [configure] allow boot and shutdown ttys to be changed

Scott James Remnant scott at ubuntu.com
Wed Mar 17 22:16:17 PDT 2010


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 |    7 +++++++
 src/main.c   |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index fafef27..41a8921 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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], [
@@ -223,6 +229,7 @@ AC_OUTPUT([Makefile
            src/plugins/renderers/frame-buffer/Makefile
            src/plugins/renderers/drm/Makefile
            src/plugins/renderers/x11/Makefile
+           src/plugins/renderers/vga16fb/Makefile
            src/plugins/splash/Makefile
            src/plugins/splash/throbgress/Makefile
            src/plugins/splash/fade-throbber/Makefile
diff --git a/src/main.c b/src/main.c
index edf7289..a865a1d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);
-- 
1.7.0



More information about the plymouth mailing list