mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
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:
1 parent
62287f8fcc
commit
f6f2895524
5 files changed
+76
-49
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user