summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2010-03-18 05:16:17 +0000
committerScott James Remnant <scott@ubuntu.com>2010-03-18 20:01:31 +0000
commit48bba4f1cdffcdb9aa8a2cde01f019f0b1b3eff0 (patch)
treee5338f190f4e112bdd25a34b0e9523286f303cc2
parent97b3d4d60d4881810c2d149e1f317a272300eb82 (diff)
[configure] allow boot and shutdown ttys to be changedimproved-vt-handling
Allow distributions like Ubuntu to override the boot and shutdown ttys from the configure script so they don't have to patch the source.
-rw-r--r--configure.ac6
-rw-r--r--src/main.c4
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=<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], [
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);