Commit 079a09fb authored by Lennart Poettering's avatar Lennart Poettering
Browse files

util: properly resolve /dev/console if more than once console= argument was...

util: properly resolve /dev/console if more than once console= argument was passed on the kernel command line
parent f212ac12
......@@ -3573,7 +3573,13 @@ const char *default_term_for_tty(const char *tty) {
if (streq(tty, "console"))
if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
truncate_nl(active);
tty = active;
/* If multiple log outputs are configured the
* last one is what /dev/console points to */
if ((tty = strrchr(active, ' ')))
tty++;
else
tty = active;
}
term = tty_is_vc(tty) ? "TERM=linux" : "TERM=vt100";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment