Bug 141312 (IT_46865) - zsh doesn't source /etc/profile.d/*.sh
Summary: zsh doesn't source /etc/profile.d/*.sh
Keywords:
Status: CLOSED ERRATA
Alias: IT_46865
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: zsh
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 132991
TreeView+ depends on / blocked
 
Reported: 2004-11-30 10:59 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-20 03:25:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:028 0 normal SHIPPED_LIVE zsh bug fix update 2005-05-19 04:00:00 UTC

Description Bastien Nocera 2004-11-30 10:59:10 UTC
zsh is one of the only shells we ship that doesn't source /etc/profile.d.

Here's a patch for zsh-4.0.7-1:
--- /etc/zprofile.old   2004-11-30 10:55:40.000000000 +0000
+++ /etc/zprofile       2004-11-30 10:56:03.000000000 +0000
@@ -7,3 +7,10 @@
  
 PATH="$PATH:$HOME/bin"
 export PATH
+
+for i in /etc/profile.d/*.sh ; do
+       if [ -r "$i" ]; then
+               . $i
+       fi
+done
+

Comment 1 Colin Walters 2005-01-03 20:51:47 UTC
Looks to me like all we need to do is source /etc/profile; this itself
sources /etc/profile.d/*, no?

Comment 2 Bastien Nocera 2005-01-04 09:47:48 UTC
# tail -n 7 /etc/profile
for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done


Looks like it should be enough indeed.

Comment 3 Colin Walters 2005-01-05 02:17:21 UTC
Actually, the default /etc/skel/.zshrc already sources /etc/profile.d
itself.

Did this not work for the customer?

Comment 4 Bastien Nocera 2005-01-05 09:44:33 UTC
The customer didn't have a ~/.zshrc. I can see a discrepancy in that
/etc/profile.d is sourced by the system-wide configuration file when
using bash (/etc/profile) but by the user-wide config file for zsh.
Any way to change this?

Comment 8 Dennis Gregorovic 2005-05-20 03:25:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-028.html



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