Simplify, drop --enable-fallback-shell from configure script

Recommend using `notty` option in tty stanza instead.  See the updated
docs for details.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-04-18 23:13:19 +02:00
1 parent aee92751ac
commit 7f76202865
8 files changed
+20 -53

No files matched your search

-26
View File
@@ -286,32 +286,6 @@ int tty_exec(svc_t *tty)
return run_getty2(dev, tty->cmd, args, tty->noclear, tty->nowait, tty->rlimit);
}
/*
* Fallback shell if no TTYs are active
*/
int tty_fallback(char *file)
{
svc_t *svc, *iter = NULL;
size_t num = 0;
for (svc = svc_iterator(&iter, 1); svc; svc = svc_iterator(&iter, 0)) {
if (!svc_is_tty(svc) || svc_is_removed(svc))
continue;
num++;
}
#ifdef FALLBACK_SHELL
char line[32] = "tty [12345789] notty noclear";
if (!num) {
_d("No TTY active in configuration, enabling fallback shell.");
return service_register(SVC_TYPE_TTY, line, global_rlimit, file);
}
#endif
return num == 0;
}
/**
* Local Variables:
* indent-tabs-mode: t