Bug 510374 - 'source' keyword invalid in pdksh
Summary: 'source' keyword invalid in pdksh
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kdelibs
Version: 5.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Than Ngo
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 469297 499522 5.4, TechnicalNotes 523968
TreeView+ depends on / blocked
 
Reported: 2009-07-08 20:27 UTC by Jeff Bastian
Modified: 2018-11-30 23:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
pdksh — a new package in Red Hat Enterprise Linux 5.4 — does not recognize the keyword source in scripts. However, the /etc/profile.d/kde.sh script uses the source keyword in the line source /etc/sysconfig/prelink. Consequently, if a user is using pdksh as their shell, and KDE is installed, the following error message will be returned in login shells: ksh: /etc/profile.d/kde.sh[7]: source: not found To work around this issue, change the source /etc/sysconfig/prelink line in the /etc/profile.d/kde.sh script to . /etc/sysconfig/prelink The keyword . is an alias for source in all Bourne compatible shells including bash, AT&T ksh, and pdksh. This issue will be resolved in an upcoming update to Red Hat Enterprise Linux 5.4.
Clone Of:
Environment:
Last Closed: 2013-09-23 11:25:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Bastian 2009-07-08 20:27:30 UTC
Description of problem:
RHEL 5.4 is adding pdksh back in, see bug 469297.  Unfortunately, pdksh being ksh88 compliant, it does not support the 'source' keyword to source other scripts, it only has the '.' command.

/etc/profile.d/kde.sh uses 'source':
   source /etc/sysconfig/prelink

Fortunately this is a quick and easy fix, just change it to:
   . /etc/sysconfig/prelink


Version-Release number of selected component (if applicable):
kdelibs-3.5.4-22.el5_3
pdksh-5.2.14-36.el5

How reproducible:
every time

Steps to Reproduce:
1. yum -y install pdksh
2. alternatives --set ksh /bin/pdksh
3. usermod -s /bin/ksh johndoe
4. su -l johndoe

Actual results:
1. ksh: /etc/profile.d/kde.sh[7]: source: not found
2. $KDE_IS_PRELINKED environment variable is not set.

Expected results:
1. no error on login
2. $KDE_IS_PRELINKED environment is set to 1

Additional info:

Comment 5 Jeff Bastian 2009-07-24 15:20:04 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Cause:
=======
pdksh (new to RHEL 5.4) does not recognize the keyword 'source' in scripts, but /etc/profile.d/kde.sh uses the keyword in the line
  source /etc/sysconfig/prelink

Consequence:
============
If a user has their shell set to pdksh (newly added to RHEL 5.4) and KDE is installed, they will get an error in login shells:
  ksh: /etc/profile.d/kde.sh[7]: source: not found

Fix:
====
This will be fixed in a future update to RHEL 5.4.  In the meantime, if you're hitting this bug, you can edit the /etc/profile.d/kde.sh script and change the keyword 'source' to just '.'.

That is, change
  source /etc/sysconfig/prelink
to
  . /etc/sysconfig/prelink

Result:
=======
The keyword '.' is an alias for 'source', and all Bourne compatible shells including bash, AT&T ksh, and pdksh understand '.'

Comment 9 Ryan Lerch 2009-08-18 01:29:21 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,22 +1,15 @@
-Cause:
-=======
-pdksh (new to RHEL 5.4) does not recognize the keyword 'source' in scripts, but /etc/profile.d/kde.sh uses the keyword in the line
-  source /etc/sysconfig/prelink
+pdksh — a new package in Red Hat Enterprise Linux 5.4 — does not recognize the keyword source in scripts. However, the /etc/profile.d/kde.sh script uses the source keyword in the line source /etc/sysconfig/prelink. Consequently, if a user is using pdksh as their shell, and KDE is installed, the following error message will be returned in login shells:
 
-Consequence:
-============
-If a user has their shell set to pdksh (newly added to RHEL 5.4) and KDE is installed, they will get an error in login shells:
-  ksh: /etc/profile.d/kde.sh[7]: source: not found
+ksh: /etc/profile.d/kde.sh[7]: source: not found
 
-Fix:
-====
-This will be fixed in a future update to RHEL 5.4.  In the meantime, if you're hitting this bug, you can edit the /etc/profile.d/kde.sh script and change the keyword 'source' to just '.'.
+To work around this issue, change the
 
-That is, change
-  source /etc/sysconfig/prelink
-to
-  . /etc/sysconfig/prelink
+source /etc/sysconfig/prelink
 
-Result:
+line in the /etc/profile.d/kde.sh script to
-=======
+
-The keyword '.' is an alias for 'source', and all Bourne compatible shells including bash, AT&T ksh, and pdksh understand '.'+. /etc/sysconfig/prelink
+
+The keyword . is an alias for source in all Bourne compatible shells including bash, AT&T ksh, and pdksh.
+
+This issue will be resolved in an upcoming update to Red Hat Enterprise Linux 5.4.


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