pid1: initialize TERM environment variable correctly
authorFranck Bui <fbui@suse.com>
Mon, 20 Jun 2016 16:54:21 +0000 (18:54 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 22 Jun 2016 06:28:55 +0000 (08:28 +0200)
commit32391275c02715f76232128c49b19bb619cd9463
treeee1145f10b2a998c19187e2c9943db7303551bba
parent8ce0611e42c2b0d11007e2172edaa86ce4e4125d
pid1: initialize TERM environment variable correctly

When systemd is started by the kernel, the kernel set the TERM
environment variable unconditionnally to "linux" no matter the console
device used. This might be an issue for dumb devices with no colors
support.

This patch uses default_term_for_tty() for getting a more accurate
value. But it makes sure to keep the user preferences (if any) which
might be passed via the kernel command line. For that purpose /proc
should be mounted.
src/core/main.c