From: Scott James Remnant Date: Thu, 18 Mar 2010 05:16:17 +0000 (+0000) Subject: [configure] allow boot and shutdown ttys to be changed X-Git-Tag: 0.8.0~53^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fimproved-vt-handling;p=thirdparty%2Fplymouth.git [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. --- 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);