aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorRoman Kyrylych <roman@archlinux.org>2007-12-12 10:28:37 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2007-12-13 11:15:06 -0600
commit9d86b8814583509069ad6707688e2b41fc0d292f (patch)
treecba3a6c07c1b15185dc1810330868d8eef1e1e41 /functions
parent662a52c15343338e9d843c6f70d39acefd3a2c4c (diff)
downloadinitscripts-9d86b8814583509069ad6707688e2b41fc0d292f.tar.xz
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 <roman@archlinux.org> Converted to if/elsif form Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'functions')
-rw-r--r--functions4
1 files changed, 3 insertions, 1 deletions
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=""