Bug 711453 - /etc/rc.d/init.d/functions will die if /etc/profile.d/lang.sh doesn't exist.
Summary: /etc/rc.d/init.d/functions will die if /etc/profile.d/lang.sh doesn't exist.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-07 14:38 UTC by Denys Vlasenko
Modified: 2014-03-17 03:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-20 10:25:37 UTC
Type: ---


Attachments (Terms of Use)

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.


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