mirror of
https://github.com/troglobit/finit.git
synced 2026-11-15 19:13:11 +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);
|
rcsd = strdup(FINIT_RCSD);
|
||||||
|
|
||||||
result = parse_conf(file);
|
result = parse_conf(file);
|
||||||
if (!tty_num())
|
if (!tty_num()) {
|
||||||
tty_register(FALLBACK_SHELL);
|
char *fallback = FALLBACK_SHELL;
|
||||||
|
|
||||||
|
if (console)
|
||||||
|
fallback = console;
|
||||||
|
|
||||||
|
tty_register(fallback);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,8 @@
|
|||||||
# define HAVE_DBUS
|
# define HAVE_DBUS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If the user configures us to not know about any getty use the system
|
||||||
|
* defined /bin/sh (or similar) as fallback for TTYs. */
|
||||||
#ifndef FALLBACK_SHELL
|
#ifndef FALLBACK_SHELL
|
||||||
# define FALLBACK_SHELL _PATH_BSHELL
|
# define FALLBACK_SHELL _PATH_BSHELL
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user