Allow loading TTYs from /etc/finit.d rather than /etc/finit.conf

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-07-08 15:28:22 +02:00
parent fe362341dc
commit eec32e299b
+11 -13
View File
@@ -308,19 +308,6 @@ static void parse_static(char *line)
cfglevel = 2; /* Fallback */
return;
}
/* TODO: Make console & tty dynamically loadable from /etc/finit.d */
if (MATCH_CMD(line, "console ", x)) {
if (console) free(console);
console = strdup(strip_line(x));
return;
}
/* TODO: Make console & tty dynamically loadable from /etc/finit.d */
if (MATCH_CMD(line, "tty ", x)) {
tty_register(strip_line(x));
return;
}
}
static void parse_dynamic(char *line, struct timeval *mtime)
@@ -363,6 +350,17 @@ static void parse_dynamic(char *line, struct timeval *mtime)
conf_parse_rlimit(x);
return;
}
if (MATCH_CMD(line, "console ", x)) {
if (console) free(console);
console = strdup(strip_line(x));
return;
}
if (MATCH_CMD(line, "tty ", x)) {
tty_register(strip_line(x));
return;
}
}
static void tabstospaces(char *line)