Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 6992 - /etc/profile.d/ causes problems for ksh users
Summary: /etc/profile.d/ causes problems for ksh users
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
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:
Clone Of:
Last Closed: 1999-12-17 22:31:13 UTC

Attachments (Terms of Use)

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

 function name () {

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 {


 name() {

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

Meanwhile, /etc/profile.d/ 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/, 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/ anywhere in our
distribution. What does rpm -qf /etc/profile.d/ say?

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