Bug 639063

Summary: profile.d scripts do not load properly in zsh
Product: [Fedora] Fedora Reporter: Elliott Forney <elliott.forney>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: nalin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-30 23:08:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elliott Forney 2010-09-30 18:08:11 UTC
Description of problem:

When switching from bash to zsh the environment initialization scripts in /etc/profile.d/krb5-*.sh fail.  They complain about pathmunge not being defined.  zsh continues to work, just a bothersome message and no krb paths.

Version-Release number of selected component (if applicable):

krb5-devel-1.7.1-13.fc12
krb5-workstation-1.7.1-13.fc12

How reproducible:

Always.

Steps to Reproduce:
1.  Make sure krb5-workstation and krb5-devel are installed
2.  log in using bash
3.  switch shells to zsh
  
Actual results:

platte:~$ zsh
/etc/profile.d/krb5-devel.sh:1: command not found: pathmunge
/etc/profile.d/krb5-devel.sh:2: command not found: pathmunge
/etc/profile.d/krb5-workstation.sh:1: command not found: pathmunge
/etc/profile.d/krb5-workstation.sh:2: command not found: pathmunge
[idfah@platte]~%

Expected results:

platte:~$ zsh
[idfah@platte]~%

Additional info:

On startup zsh appears to load /etc/zprofile which, in turn, sources /etc/profile.  /etc/profile then sources /etc/profile.d/*.sh

The pathmunge function is defined in /etc/profile but does not persist in scripts that are sourced.  Shell functions do persist in bash, I'm not sure why they don't in zsh.  In any case, it seems reasonable to me that snippets in /etc/profile.d should not make assumptions about the contents of /etc/profile?

Comment 1 Elliott Forney 2010-09-30 23:08:16 UTC

*** This bug has been marked as a duplicate of bug 633212 ***