mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
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:
1 parent
aee92751ac
commit
7f76202865
8 files changed
+20
-53
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user