Bug 519539 - /etc/profile contains non-portable bash specific syntax
Summary: /etc/profile contains non-portable bash specific syntax
Keywords:
Status: CLOSED DUPLICATE of bug 508624
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: setup
Version: 4.8
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-27 00:27 UTC by Stephen Harris
Modified: 2009-08-27 06:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-27 06:30:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephen Harris 2009-08-27 00:27:17 UTC
Description of problem:

/etc/profile contains the following lines:

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        if [ "$PS1" ]; then
            . $i
        else
            . $i &>/dev/null
        fi
    fi
done

"&>" is bash specific and may cause issues if a user has a non-bash sh-like shell.  The correct syntax for portability is "> /dev/null 2>&1"

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

setup-2.5.37-3.el4.noarch.rpm (and maybe earlier)

Comment 1 Radek Bíba 2009-08-27 06:30:09 UTC
Already fixed in setup-2.5.37-4.el4, see RHBA-2009:1197 (Fastrack).

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


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