| Summary: | Error in /etc/profile.d/colorls.csh | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Nikhil AR <nalayil> |
| Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> |
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.2 | CC: | aai, asersen, azelinka, meyering, nalayil, prc, rpiddapa |
| 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: | 2012-06-20 14:34:33 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
*** Bug 808211 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0933.html |
Description of problem: /etc/profile.d/colorls.csh contains this (line 20): if ( "`tty -s && tput colors`" == "256" ) then Csh is not short-circuiting the logical AND on this line, such that both "tty -s" and "tput colors" are executed. This causes an error "tput: No value for $TERM and no -T specified" when the SHELL has no TERM defined (via rsh for example). Version-Release number of selected component (if applicable): coreutils-8.4-16.el6.x86_64 How reproducible: Always Additional info: Here is a suggested fix: --- /etc/profile.d/colorls.csh 2010-04-28 08:58:35.000000000 -0600 +++ /tmp/colorls.csh 2012-03-12 11:04:19.971867964 -0600 @@ -16,8 +16,9 @@ set COLORS="/etc/DIR_COLORS.$TERM" endif endif + if ( -e "/etc/DIR_COLORS.256color" ) then - if ( "`tty -s && tput colors`" == "256" ) then + if ( "`tty -s` && tput colors" == "256" ) then set COLORS=/etc/DIR_COLORS.256color endif endif