From aff11d83d838f6194c871d1c1c5f052b1722b443 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 26 Feb 2015 18:56:44 +0100 Subject: [PATCH] tty.c: Let fallback shells be consoles, improved job control etc. Signed-off-by: Joachim Nilsson --- finit.h | 4 ++-- tty.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/finit.h b/finit.h index 3790d8b8..f1a78e8f 100644 --- a/finit.h +++ b/finit.h @@ -39,14 +39,14 @@ # define CONSOLE _PATH_CONSOLE # define SETUP_DEVFS "/sbin/mdev -s" # define GETTY "/sbin/getty -L" -# define GETTY_BUSYBOX +# define GETTY_BUSYBOX /* Tell tty.c about the getty argument order */ # define BAUDRATE 115200 # define RUNLEVEL 2 #else /* Debian/Ubuntu based distributions */ # define CONSOLE "/dev/tty1" # define SETUP_DEVFS "/sbin/udevd --daemon" # define GETTY "/sbin/getty -8" -# define GETTY_AGETTY +# define GETTY_AGETTY /* Tell tty.c about the getty argument order */ # define BAUDRATE 38400 # define RUNLEVEL 2 # define RANDOMSEED "/var/lib/urandom/random-seed" diff --git a/tty.c b/tty.c index 4f7da909..6603e9dc 100644 --- a/tty.c +++ b/tty.c @@ -145,9 +145,11 @@ void tty_start(finit_tty_t *tty) snprintf(line, sizeof(line), "%s %d %s %s", GETTY, tty->baud, tty->name, tty->term ?: ""); #else strlcpy(line, FALLBACK_SHELL, sizeof(line)); + is_console = 1; #endif } else { strlcpy(line, tty->name, sizeof(line)); + is_console = 1; } cmd = strtok(line, " "); args[i++] = basename(cmd);