mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
Refactor tty handling to use service backend enabling conditions etc.
Initial refactor of the tty implementation to use the service/run/task general backend. This enables all the features of services also for ttys, except logging because it makes no sense. Work in progress: - plugins/tty.c does not work anymore, could possibly be removed in favor of usinga (a new) condition instead (if-tty-exists) - fallback tty does not work anymore, should we remove it, or can we handle it as an optional built-in with (a new) condition? - @console does not work anymore, needs to generate N cloned services Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
3cf5d36972
commit
30020263ba
12 files changed
+285
-497
No files matched your search
+2
-3
@@ -592,7 +592,7 @@ static void parse_dynamic(char *line, struct rlimit rlimit[], char *file)
|
||||
|
||||
/* Regular or serial TTYs to run getty */
|
||||
if (MATCH_CMD(line, "tty ", x)) {
|
||||
tty_register(strip_line(x), rlimit, file);
|
||||
service_register(SVC_TYPE_TTY, strip_line(x), rlimit, file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -664,7 +664,6 @@ int conf_reload(void)
|
||||
/* Mark and sweep */
|
||||
cgroup_mark_all();
|
||||
svc_mark_dynamic();
|
||||
tty_mark();
|
||||
|
||||
/*
|
||||
* Reset global rlimit to bootstrap values from conf_init().
|
||||
@@ -678,7 +677,7 @@ int conf_reload(void)
|
||||
/* If rescue.conf is missing, fall back to a root shell */
|
||||
rc = parse_conf(RESCUE_CONF, 0);
|
||||
if (rc)
|
||||
tty_register(line, global_rlimit, NULL);
|
||||
service_register(SVC_TYPE_TTY, line, global_rlimit, NULL);
|
||||
|
||||
print(rc, "Entering rescue mode");
|
||||
goto done;
|
||||
|
||||
Reference in new issue
Block a user