|
[Note: this answer works for CentOS. Fedora should be similar]
You add your own functions to the boot process either in /etc/rc.d/rc.local or as scripts in /etc/rc.d/init.d/ (see man chkconfig to see how the runlevel files are set up). Include /etc/rc.d/init.d/functions in your script and environment variables will be set with commands to set the following colours:
SETCOLOR_SUCCESS # green
SETCOLOR_FAILURE # red
SETCOLOR_WARNING # yellow
SETCOLOR_NORMAL # normal
So you added the following to rc.local:
. /etc/rc.d/init.d/functions
$SETCOLOR_FAILURE
echo "Hello world!"
$SETCOLOR_NORMAL
You will get a red "Hello world!" in your boot sequence. For other colours, you would need to look up the ANSI escape sequences, which you can find on the Web easily enough.
__________________
Moray.
"To err is human; to purr, feline."
|