Bug 1000214 - service can not use the language LANG= correctly
Summary: service can not use the language LANG= correctly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.4
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-23 01:05 UTC by JianHong Yin
Modified: 2019-11-21 14:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-21 14:36:12 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description JianHong Yin 2013-08-23 01:05:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. install a rhel6.4 with chinese simplified language set
2. see the follow section: Actual results
3.

Actual results:
[root@dhcp-13-188 ~]# LANG=C  /etc/init.d/autofs  start
Starting automount:                                        [  OK  ]
[root@dhcp-13-188 ~]# LANG=C  /etc/init.d/autofs  stop
Stopping automount:                                        [  OK  ]
[root@dhcp-13-188 ~]# LANG=C service autofs start
正在启动 automount:                                       [确定]
  `--> LANG=C setup  should output in english ...
[root@dhcp-13-188 ~]# LANG=C service autofs stop
停止 automount:                                           [确定]



Additional info:

Comment 2 Lukáš Nykrýn 2013-08-23 14:37:24 UTC
I am not sure that this is a bug. As it is stated in the manpage "service
runs a System V init script in as predictable environment as possible,
removing most environment variables". Service is supposed to remove settings of environment variables.

Comment 3 RHEL Program Management 2013-10-14 02:35:46 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Lukáš Nykrýn 2014-03-24 14:47:27 UTC
NOTABUG for reason from comment 2

Comment 5 Yuki Okada 2019-04-19 02:32:11 UTC
It is stated in service(8) that LANG environment variable is passed to the init scripts.

ENVIRONMENT
       LANG, TERM
              The only environment variables passed to the init scripts.

In fact, however, LANG is not passed as shown below.

# echo $LANG
ja_JP.UTF-8
# LANG=C service corosync status
corosync は停止しています
# LANG=C /etc/init.d/corosync status
corosync is stopped

It appears this is not an expected behavior.

Comment 6 Jan Macku 2019-11-21 14:17:09 UTC
This bug is currently fixed in upstream[1]. The LANG variable was never intended to be passed, so we fix man page.

Unfortunately we no longer fix these type of bugs in RHEL6.

[1] https://github.com/fedora-sysv/initscripts/commit/1fcae34d2fadb0ec46bd26b086b82ebefe033f65


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