From 6553f2eea474d2479a610c3b928496047cf1054f Mon Sep 17 00:00:00 2001 From: Roman Kyrylych Date: Wed, 5 Dec 2007 18:28:20 +0200 Subject: [PATCH] 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 --- functions | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/functions b/functions index 8b5ecf1..f61b164 100644 --- a/functions +++ b/functions @@ -21,6 +21,7 @@ STAT_COL=$[$STAT_COL - 13] # disable colors on broken terminals TERM_COLORS="$(tput colors 2>/dev/null)" +[ $? = 3 ] && TERM_COLORS=8 if [ -n "${TERM_COLORS}" ]; then case "${TERM_COLORS}" in *[!0-9]*) -- 1.5.3.7