]> TLD Linux GIT Repositories - packages/rc-scripts.git/blob - color-fix.patch
- release 6
[packages/rc-scripts.git] / color-fix.patch
1 From 5d89b49a413e24dae01d41cdb0d50b919ad4830e Mon Sep 17 00:00:00 2001
2 From: Marcin Krol <hawk@tld-linux.org>
3 Date: Fri, 8 May 2020 21:18:49 +0200
4 Subject: [PATCH] - drop setting color to white as default, use color reset
5  instead
6
7 ---
8  lib/functions         | 7 +++----
9  sysconfig/init-colors | 2 +-
10  2 files changed, 4 insertions(+), 5 deletions(-)
11
12 diff --git a/lib/functions b/lib/functions
13 index fb41ffa..8f08dc6 100644
14 --- a/lib/functions
15 +++ b/lib/functions
16 @@ -39,7 +39,6 @@ BLUE=4
17  MAGENTA=5
18  CYAN=6
19  WHITE=7
20 -NORMAL=15
21  # Bold definition (second parameter to termput setaf)
22  BOLD=1
23  NOBOLD=0
24 @@ -53,7 +52,7 @@ CTLD="$GREEN"         # "TLD Linux" color
25  CI="$RED"              # Capital I color (press I to enter interactive startup)
26  CRESMAN="$GREEN"       # "Resource Manager" color
27  CHARS=""               # Characters displayed on the beginning of show line
28 -CCHARS="$NORMAL"       # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example)
29 +CCHARS="$WHITE"                # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example)
30  
31  # Source configuration if available - may override default values
32  [ -r /etc/sysconfig/init-colors ] && . /etc/sysconfig/init-colors
33 @@ -283,7 +282,7 @@ termput() {
34                         is_yes "$COLOR_INIT" && echo -ne "\033[${ISBOLD};3${2}m"
35                         ;;
36                 op)
37 -                       termput setaf $NORMAL
38 +                       echo -ne "\033[0m"
39                         ;;
40                 esac
41         else
42 @@ -296,7 +295,7 @@ termput() {
43                         is_yes "$COLOR_INIT" && tput setaf "$2"
44                         ;;
45                 op)
46 -                       termput setaf $NORMAL
47 +                       tput sgr0
48                         ;;
49                 esac
50         fi
51 diff --git a/sysconfig/init-colors b/sysconfig/init-colors
52 index 1632fdb..8798b96 100644
53 --- a/sysconfig/init-colors
54 +++ b/sysconfig/init-colors
55 @@ -9,4 +9,4 @@ CTLD="$GREEN"           # "TLD Linux" color
56  CI="$RED"              # Capital I color (press I to enter interactive startup)
57  CRESMAN="$GREEN"       # "Resource Manager" color
58  CHARS=""               # Characters displayed on the beginning of show line
59 -CCHARS="$NORMAL"       # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example)
60 +CCHARS="$WHITE"                # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example)
61 -- 
62 2.25.1
63