Red Hat Bugzilla – Bug 804604
Error in /etc/profile.d/colorls.csh
Last modified: 2013-03-03 21:43:30 EST
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):
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 @@
if ( -e "/etc/DIR_COLORS.256color" ) then
- if ( "`tty -s && tput colors`" == "256" ) then
+ if ( "`tty -s` && tput colors" == "256" ) then
*** 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.