Bug 141312 - (IT_46865) zsh doesn't source /etc/profile.d/*.sh
zsh doesn't source /etc/profile.d/*.sh
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: zsh (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Colin Walters
Mike McLean
:
Depends On:
Blocks: 132991
  Show dependency treegraph
 
Reported: 2004-11-30 05:59 EST by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-19 23:25:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2004-11-30 05:59:10 EST
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 15:51:47 EST
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 04:47:48 EST
# 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-04 21:17:21 EST
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 04:44:33 EST
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-19 23:25:47 EDT
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.