From 9d86b8814583509069ad6707688e2b41fc0d292f Mon Sep 17 00:00:00 2001 From: Roman Kyrylych Date: Wed, 12 Dec 2007 10:28:37 -0600 Subject: Fix FS#8843 (no colors in rc.sysinit output with separate /usr) when tput returns exit code 3 - assume it output '8' (as written in the /usr/share/terminfo/l/linux file) Signed-off-by: Roman Kyrylych Converted to if/elsif form Signed-off-by: Aaron Griffin --- functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'functions') diff --git a/functions b/functions index 1cefa0b..2220835 100644 --- a/functions +++ b/functions @@ -21,7 +21,9 @@ STAT_COL=$[$STAT_COL - 13] # disable colors on broken terminals TERM_COLORS="$(tput colors 2>/dev/null)" -if [ -n "${TERM_COLORS}" ]; then +if [ $? = 3 ]; then + TERM_COLORS=8 +elif [ -n "${TERM_COLORS}" ]; then case "${TERM_COLORS}" in *[!0-9]*) USECOLOR="" -- cgit v1.2.3