RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2030366 - KornShell-Scripts sourcing /etc/profile.d/which2.sh fail when inoved by SHELL!=KSH
Summary: KornShell-Scripts sourcing /etc/profile.d/which2.sh fail when inoved by SHELL...
Keywords:
Status: CLOSED DUPLICATE of bug 2009547
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: which
Version: 8.5
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Than Ngo
QA Contact: CS System Management SST QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-08 15:05 UTC by jonathan
Modified: 2021-12-08 15:28 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-08 15:27:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-105161 0 None None None 2021-12-08 15:06:36 UTC

Description jonathan 2021-12-08 15:05:24 UTC
Description of problem:
KornShell-Scripts run into an error when sourcing /etc/profile.d/which2.sh and invoked by SHELL=!KSH.

Version-Release number of selected component (if applicable):
2.21-16.el8

How reproducible:

Steps to Reproduce:
1. Source /etc/profile.d/which2.sh in KSH-Script (with #!/bin/ksh as shebang).
2. Invoke script from e.g. bash.

Actual results:
Erorr-Message: export: -f: unknown option

Expected results:
KSH-Script runs properly.

Additional info:

[ec2-user@machine tmp]$ cat tst.ksh
#!/bin/ksh
#set -x
. /etc/profile
echo "$0"

With implicit interpreter:
[ec2-user@machine tmp]$ ./tst.ksh
./tst.ksh[3]: .[70]: .[19]: export: -f: unknown option
Usage: export [-p] [name[=value]...]

With explicit interpreter:
[ec2-user@machine tmp]$ /bin/ksh ./tst.ksh
./tst.ksh

Comment 1 Than Ngo 2021-12-08 15:27:51 UTC
this issue was reported,  https://bugzilla.redhat.com/show_bug.cgi?id=2009547
Please download new build with the fix from https://than.fedorapeople.org/rhel8/which/

Thanks

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


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