You are not logged in.
Pages: 1
Hello
I have a small problem with colors during booting.
From the message
INIT: version 2.86 booting
till
INIT: entering runlevel: 3
there are no colors for messages (all text is gray).
If I commented out the following text in /etc/rc.d/functions
# disable colors on broken terminals
#TERM_COLORS="$(tput colors 2>/dev/null)"
#if [ -n "${TERM_COLORS}" ]; then
# case "${TERM_COLORS}" in
# *[!0-9]*)
# USECOLOR=""
# ;;
# *)
# [ "${TERM_COLORS}" -lt 8 ] && USECOLOR=""
# ;;
# esac
#else
# USECOLOR=""
#fi
#unset TERM_COLORS
then everything works fine. But it does not seem to be a correct solution
How can I resolve this problem properly?
Offline
By reading your post I am not sure wheter or not you want colors. If you don't want colors then you could use this solution:
/etc/rc.conf
USECOLOR="no"
Offline
I want colors and USECOLOR="yes" is in my /etc/rc.conf. The problem is that all boot messages before the line "INIT: entering runlevel: 3" are printed without colors.
Offline
I have noticed this problem too, do you think it is bug report worthy?
Offline
Unfortunaly I cannot describe how to reproduce this problem
Offline
This seems pretty trivial to me. I actually like the way the boot stages look different. When the colors come back up I know that my filesystem is good to go. That's just me, though.
noobus in perpetuus
Offline
Aren't those just kernel messages? Add "quiet" to your kernel line in grub/lilo to get rid of those.
Offline
No, they are not kernel messages.
Offline
Hi!
You just need to change last USECOLOR="" to USECOLOR="yes". So that the part of the functions file will look like this:
# disable colors on broken terminals
TERM_COLORS="$(/bin/tput colors 2>/dev/null)"
if [ $? = 3 ]; then
TERM_COLORS=8
elif [ -n "${TERM_COLORS}" ]; then
case "${TERM_COLORS}" in
*[!0-9]*)
USECOLOR=""
;;
*)
[ "${TERM_COLORS}" -lt 8 ] && USECOLOR=""
;;
esac
else
USECOLOR="yes"
fi
unset TERM_COLORS
Offline
Is it possible to change the color pattern there ?
edit: better yet, is it correct place to change (in rc.d/functions):
# colors:
if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
C_MAIN="\033[1;37;40m" # main text
C_OTHER="\033[1;34;40m" # prefix & brackets
C_SEPARATOR="\033[1;30;40m" # separatorC_BUSY="\033[0;36;40m" # busy
C_FAIL="\033[1;31;40m" # failed
C_DONE="\033[1;37;40m" # completed
C_BKGD="\033[1;35;40m" # backgroundedC_H1="\033[1;37;40m" # highlight text 1
C_H2="\033[1;36;40m" # highlight text 2C_CLEAR="\033[1;0m"
fi
edit 2: checked, that's the way (in case someone would need this)
Last edited by Mulac (2008-08-20 18:14:10)
Offline
Hello,
I had the same problem and I found out that it was a problem because at the beginning of the boot process my / filesystem was readonly. My dirty fix is replacing TERM_COLORS="$(/bin/tput colors 2>/dev/null)" in /etc/rc.d/functions with TERM_COLORS="$(/bin/tput colors)". The problem was that with readonly filesystem no error output can be transmitted to /dev/null.
Flo
Offline
Pages: 1