Bug 443253

Summary: /sbin/service ignores LC_MESSAGES and LANGUAGE
Product: [Fedora] Fedora Reporter: Jarkko <jval>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: poelstra, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-21 16:08:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jarkko 2008-04-19 19:30:04 UTC
# locale
LANG=fi_FI.UTF-8
LC_CTYPE="fi_FI.UTF-8"
LC_NUMERIC="fi_FI.UTF-8"
LC_TIME="fi_FI.UTF-8"
LC_COLLATE="fi_FI.UTF-8"
LC_MONETARY="fi_FI.UTF-8"
LC_MESSAGES="fi_FI.UTF-8"
LC_PAPER="fi_FI.UTF-8"
LC_NAME="fi_FI.UTF-8"
LC_ADDRESS="fi_FI.UTF-8"
LC_TELEPHONE="fi_FI.UTF-8"
LC_MEASUREMENT="fi_FI.UTF-8"
LC_IDENTIFICATION="fi_FI.UTF-8"
LC_ALL=

# echo $LANGUAGE
en_GB.UTF-8:en_US.UTF-8:en.UTF-8

# service sshd restart
Suljetaan sshd:                                            [  OK  ]
Käynnistetään sshd:                                        [  OK  ]

--> Should be (should honor LANGUAGE):

# service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]


# LC_MESSAGES=en_GB.UTF-8 service sshd restart
Suljetaan sshd:                                            [  OK  ]
Käynnistetään sshd:                                        [  OK  ]

--> Should be (should honor LC_MESSAGES):

# LC_MESSAGES=en_GB.UTF-8 service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]


The correct way is to first check LANGUAGE, then LC_MESSAGES, and last LANG. Now
it always only checks LANG. As you see:

# LANG=en_GB.UTF-8 service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]


Only /sbin/service is broken, as you see:

# /etc/init.d/sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]


This bug happens at least in F8:

# rpm -q --whatprovides /sbin/service 
initscripts-8.60-1.x86_64

Comment 1 Bill Nottingham 2008-04-21 16:08:07 UTC

*** This bug has been marked as a duplicate of 422141 ***