From 48bba4f1cdffcdb9aa8a2cde01f019f0b1b3eff0 Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Thu, 18 Mar 2010 05:16:17 +0000 Subject: [configure] allow boot and shutdown ttys to be changed 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 | 6 ++++++ src/main.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fafef273..62682eef 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,12 @@ AC_ARG_WITH(release-file, AC_HELP_STRING([--with-release-file=], [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=], [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], [ diff --git a/src/main.c b/src/main.c index edf7289a..a865a1d8 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); -- cgit v1.2.3