Bug 711453

Summary: /etc/rc.d/init.d/functions will die if /etc/profile.d/lang.sh doesn't exist.
Product: [Fedora] Fedora Reporter: Denys Vlasenko <dvlasenk>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: iarlyy, jonathan, notting, plautrba, rvokal, vpavlin
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-20 10:25:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Denys Vlasenko 2011-06-07 14:38:04 UTC
The problem is here:

if [ -z "${NOLOCALE:-}" ] && [ -z "${LANGSH_SOURCED:-}" ] && [ -f /etc/sysconfig/i18n ] ; then
  . /etc/profile.d/lang.sh 2>/dev/null
  # avoid propagating LANGSH_SOURCED any further
  unset LANGSH_SOURCED
fi

We source /etc/profile.d/lang.sh without checking that it exists. If it doesn't, then not just this one line doesn't execute, ENTIRE script is aborted.

Comment 1 Bill Nottingham 2011-06-07 16:18:10 UTC
I can't reproduce this:

[root@nostromo ~]# cd /etc/profile.d/
[root@nostromo profile.d]# mv lang.sh  lang.cow
[root@nostromo profile.d]# SYSTEMCTL_SKIP_REDIRECT=1 /etc/rc.d/init.d/sshd status
openssh-daemon (pid  990) is running...

Are you running with any non-default settings? (set -e, for example?)

Furthermore, it's in the same package, so it's not a condition that would normally happen.

Comment 2 Václav Pavlín 2012-07-20 10:25:37 UTC
Not reproducible and, as said in Comment 1, lang.sh is part of the package and it is not missing normally.