Bug 510374 - 'source' keyword invalid in pdksh
'source' keyword invalid in pdksh
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kdelibs (Show other bugs)
5.4
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Ngo Than
Desktop QE
: ZStream
Depends On:
Blocks: 499522 469297 5.4/TechnicalNotes 523968
  Show dependency treegraph
 
Reported: 2009-07-08 16:27 EDT by Jeff Bastian
Modified: 2013-09-23 07:25 EDT (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-23 07:25:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jeff Bastian 2009-07-08 16:27:30 EDT
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 11:20:04 EDT
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-17 21:29:21 EDT
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.