colorizing in /sbin/rc

Uwe Reimann <[email protected]> 16 Sep 2003 20:52:49 +0200
Newsgroups gmane.linux.zynot.devel
Message-ID <[email protected]>
--=-Px4siSWQYOENxCo8SR4W
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi everybody,

/sbin/rc outputs the link to www.zynot.org in blue, regardless of the
setting of RC_NOCOLOR (which is set to "yes" in the case of a serial
console in /sbin/functions.sh). The attached patch fixes this.

Graham, could you apply the patch or tell me to do so or not to do so,
please.

Best regards, Uwe



--=-Px4siSWQYOENxCo8SR4W
Content-Disposition: attachment; filename=rc-scripts.patch
Content-Type: text/x-patch; name=rc-scripts.patch; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: functions.sh
===================================================================
--- functions.sh	(revision 390)
+++ functions.sh	(working copy)
@@ -114,6 +114,8 @@
 
 	HILITE=
 	BRACKET=
+
+	BLUE=
 else
 	GOOD=$'\e[32;01m'
 	WARN=$'\e[33;01m'
@@ -122,6 +124,8 @@
 
 	HILITE=$'\e[36;01m'
 	BRACKET=$'\e[34;01m'
+
+	BLUE=$'\e[34;01m'
 fi
 
 
Index: rc
===================================================================
--- rc	(revision 390)
+++ rc	(working copy)
@@ -92,7 +92,7 @@
 	PATH="/bin:/sbin:/usr/bin:/usr/sbin:${PATH}"
 
 	echo
-	echo -e "${GOOD}$(os-release)${GENTOO_VERS}; \e[34;01mhttp://www.zynot.org/${NORMAL}"
+	echo -e "${GOOD}$(os-release)${GENTOO_VERS}; ${BLUE}http://www.zynot.org/${NORMAL}"
 	echo -e " Copyright 2001-2003 Gentoo Technologies, Inc.; Distributed under the GPL"
 	echo -e " Copyright 2003 by The Zynot Foundation; Distributed under the GPL"
 	echo

--=-Px4siSWQYOENxCo8SR4W
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
zynot-dev mailing list
[email protected]
http://lists.zynot.org/mailman/listinfo/zynot-dev

--=-Px4siSWQYOENxCo8SR4W--