diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-08 11:27:31 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-12 08:38:20 +0200 |
commit | 153d5dfd871da3980b956ba65da20d7d022f2b03 (patch) | |
tree | 6e10bd7c147c0b163e4851b932916a85811c722e /src | |
parent | 32b0be0eb865ede98fafa5cfb5f1871fa402d299 (diff) | |
download | systemd-153d5dfd871da3980b956ba65da20d7d022f2b03.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index 5347372c81..86385d6465 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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) |