Bug 870622 - The TERM environment variable is not passed to the shell
The TERM environment variable is not passed to the shell
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Michal Schmidt
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F18systemd
  Show dependency treegraph
 
Reported: 2012-10-27 07:34 EDT by Thorsten Vaupel
Modified: 2013-06-04 05:01 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-07 23:35:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
slightly modified serial-getty@.service (1020 bytes, text/plain)
2012-10-27 07:34 EDT, Thorsten Vaupel
no flags Details

  None (edit)
Description Thorsten Vaupel 2012-10-27 07:34:58 EDT
Created attachment 634160 [details]
slightly modified serial-getty@.service

Description of problem:
The unit file serial-getty@.service contains the line Environment=TERM=vt102 with the intention to pass it to the environment of the new shell but it looks as if it is ignored by agetty.

Version-Release number of selected component (if applicable):
44-20.fc17

How reproducible:
always

Steps to Reproduce:
1. instantiate a getty for a serial line
2. log in
3. echo $TERM
  
Actual results:
The value "linux" is assigned to TERM

Expected results:
The value "vt102" should be assigned to TERM

Additional info:
The attached unit file which basically appends vt102 to ExecStart works for me.
Comment 1 Michal Schmidt 2012-10-29 15:05:42 EDT
agetty always overrides the TERM variable with its own logic, unless the third argument is specified. That explains why Environment has no effect.

Furthermore, I believe there's a bug in agetty. It attempts to detect the distinction between the vc and a serial line and set TERM accordingly, but it does not work as expected. I will send Karel a fix.
Comment 3 Fedora Update System 2012-12-05 12:19:53 EST
systemd-195-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-195-10.fc18
Comment 4 Fedora Update System 2012-12-05 18:15:41 EST
Package systemd-195-10.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-195-10.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19811/systemd-195-10.fc18
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-12-07 23:35:43 EST
systemd-195-10.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.