mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
core: Try to initialize TERM from systemd.tty.term.console as well
We already have the systemd.tty.xxx kernel cmdline arguments for configuring tty's for services, let's make sure the term cmdline argument applies to pid1 as well.
This commit is contained in:
@@ -1425,6 +1425,12 @@ static int fixup_environment(void) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (r == 0) {
|
||||
r = proc_cmdline_get_key("systemd.tty.term.console", 0, &term);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
t = term ?: default_term_for_tty("/dev/console");
|
||||
|
||||
if (setenv("TERM", t, 1) < 0)
|
||||
|
||||
Reference in New Issue
Block a user