mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
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:
1 parent
12c470667f
commit
335f09726f
2 files changed
+10
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user