Add support for a fallback shell if no tty is setup

Try to do better by the user, by default, if no tty is specified in the
finit.conf.  This way the user will at least have a way to interact with
the system and repair it.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2014-04-19 22:58:20 +02:00
1 parent 62287f8fcc
commit f6f2895524
5 files changed
+76 -49

No files matched your search

+7 -1
View File
@@ -243,11 +243,17 @@ static int parse_conf(char *file)
int parse_finit_conf(char *file)
{
int result;
username = strdup(DEFUSER);
hostname = strdup(DEFHOST);
rcsd = strdup(FINIT_RCSD);
return parse_conf(file);
result = parse_conf(file);
if (!tty_num())
tty_register(FALLBACK_SHELL);
return result;
}