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

-4
View File
@@ -737,10 +737,6 @@ int conf_reload(void)
globfree(&gl);
/* Verify config, do we have at least one TTY available? */
if (tty_fallback(FINIT_CONF))
logit(LOG_WARNING, "warning, no getty enabled on local TTYs.");
/* Mark any reverse deps as chenaged. */
service_update_rdeps();
+1 -1
View File
@@ -433,7 +433,7 @@ svc_t *svc_find_by_tty(char *dev)
{
svc_t *svc, *iter = NULL;
/* this is valid for fallback shells */
/* this is valid for fallback (notty) shells */
if (!dev)
return NULL;
-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
-1
View File
@@ -51,7 +51,6 @@ int tty_parse_args (char *cmdline, struct tty *tty);
int tty_exists (char *dev);
int tty_exec (svc_t *tty);
int tty_fallback (char *file);
#endif /* FINIT_TTY_H_ */