Bug 6992 - /etc/profile.d/00functions.sh causes problems for ksh users
Summary: /etc/profile.d/00functions.sh causes problems for ksh users
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-13 21:20 UTC by David W. Tamkin
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-12-17 22:31:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description David W. Tamkin 1999-11-13 21:20:01 UTC
Functions definitions in /etc/profile.d/00functions.sh use this syntax:

 function name () {
  commands
  }

Users who select /bin/ksh as their login shell (which is actually pdksh)
get an error, the function remains undefined, and later calls to that
function come up "not found," because in pdksh function definitions have
one of these two syntaxes (one to get the behavior of AT&T ksh, one to
get that specified under POSIX):

 function name {
  commands
  }

or

 name() {
  commands
  }

It's not permitted to use both the word "function" and the empty paren-
theses.

Meanwhile, /etc/profile.d/mc.sh defines a function with only the empty
parentheses, omitting the word "function," and it's fine under both bash
and pdksh.  The bash man page implies that the word "function" is totally
optional; if it were omitted in /etc/profile.d/00functions.sh, there would
be no harm under bash and much gained for ksh users.

[Hope I'm filing this report properly.]

Comment 1 Bill Nottingham 1999-11-15 16:51:59 UTC
I can't find an /etc/profile.d/00functions.sh anywhere in our
distribution. What does rpm -qf /etc/profile.d/00functions.sh say?


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