summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c6
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)