conf.c: Slight update in TTY fallback behavior.

If no tty is configured in finit.conf, only use FALLBACK_SHELL (usually
/bin/sh on UNIX) when no console is configured either.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-02-26 18:57:10 +01:00
1 parent 12c470667f
commit 335f09726f
2 files changed
+10 -2

No files matched your search

+8 -2
View File
@@ -275,8 +275,14 @@ int parse_finit_conf(char *file)
rcsd = strdup(FINIT_RCSD);
result = parse_conf(file);
if (!tty_num())
tty_register(FALLBACK_SHELL);
if (!tty_num()) {
char *fallback = FALLBACK_SHELL;
if (console)
fallback = console;
tty_register(fallback);
}
return result;
}