Bug 460741 - zsh should emulate sh instead of ksh in init scipts
Summary: zsh should emulate sh instead of ksh in init scipts
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 12
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-30 19:01 UTC by Daniel Qarras
Modified: 2010-03-22 14:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-22 14:32:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Qarras 2008-08-30 19:01:55 UTC
Description of problem:
When zsh is sourcing init scripts under /etc/profile.d zsh is set to emulate ksh although all the init scripts are for /bin/sh or /bin/bash (ie, for Bourne shell, not for ksh). There is at least one init script that does not work with ksh:

https://bugzilla.redhat.com/show_bug.cgi?id=314431

Even without that I think it might make more sense to emulate "sh" instead of "ksh" when executing scripts starting with /bin/sh and also taking into account that some scripts might contain bashisms in which case I would presume "sh" emulation having better changes to survive than "ksh" emulation.

Testing with "sh" emulation currently works all ok.

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

How reproducible:
Always.

Steps to Reproduce:
1. See the description above.
  
Actual results:
zsh emulating ksh.

Expected results:
zsh emulating sh.

Additional info:

Comment 1 Daniel Qarras 2008-08-31 14:29:53 UTC
Hmm, actually my comment regarding "testing with sh emulation" was a gross understatement: I've used sh emulation on RHEL4/5 and at least on Fedora 6/7/8/9, perhaps even with earlier versions, without any problems.

Thanks.

Comment 2 Daniel Qarras 2008-08-31 16:45:45 UTC
Sorry about the noise, one minor nit: while at it, perhaps "source /etc/..." could changed to ". /etc/..." as "source" is the csh way, ". /path" is the sh/bash/zsh way.

Comment 3 Bug Zapper 2008-11-26 02:54:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Daniel Qarras 2009-04-03 15:07:10 UTC
This issue is still present in F11ß.

Comment 5 Bug Zapper 2009-06-09 09:41:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Daniel Qarras 2009-10-23 18:55:09 UTC
This issue is still present in F12ß.

Comment 7 Bug Zapper 2009-11-16 09:26:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 James Antill 2010-03-22 14:32:26 UTC
Well the "sh" vs "ksh" thing is a bit misleading, as "sh" there means "sh family" of which ksh is a member. I think ksh is closer to the desired behaviour, although I'm not an expert.

If zsh had an "emulate bash" mode, that would probably be worth it, but as it is I don't see the advantage of saying "emulate sh".


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