Bug 519539

Summary: /etc/profile contains non-portable bash specific syntax
Product: Red Hat Enterprise Linux 4 Reporter: Stephen Harris <lists>
Component: setupAssignee: Ondrej Vasik <ovasik>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 4.8   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-27 06:30:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***