[24297] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23895 - trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Sun Jun 21 04:44:06 2009

Date: Sun, 21 Jun 2009 04:43:56 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <200906210843.n5L8humY004678@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: geofft
Date: 2009-06-21 04:43:56 -0400 (Sun, 21 Jun 2009)
New Revision: 23895

Modified:
   trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/installer.sh
Log:
Attept to make colors work in the PXE installer.

Modified: trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/installer.sh
===================================================================
--- trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/installer.sh	2009-06-21 06:14:56 UTC (rev 23894)
+++ trunk/debathena/scripts/installer/pxe/jaunty/debathena-jaunty/installer.sh	2009-06-21 08:43:56 UTC (rev 23895)
@@ -66,15 +66,13 @@
   mv -f /etc/resolv.conf.new /etc/resolv.conf
 }
 
-# Color strings. If the tput abstraction layer gives an error, then no string is fine.
-tput_noerr () {
-    tput "$@" 2>/dev/null
-}
-nnn=`tput_noerr sgr0`                                  # Normal
-rrr=`tput_noerr bold``tput_noerr setaf 1`              # Red, bold
-ccc=`tput_noerr setaf 6`                               # Cyan
-ddd="${rrr}`tput_noerr setab 7`"                       # "Blood on concrete"
-ddb="${rrr}`tput_noerr setab 7``tput_noerr blink`" 
+# Color strings. I'd like to use tput, but the installer doesn't have it.
+esc=""
+nnn="${esc}[m"          # Normal
+ccc="${esc}[36m"        # Cyan
+rrr="${esc}[1;31m"      # Bold and red
+ddd="${esc}[1;31;47m"   # Plus gray background
+ddb="${esc}[1;31;47;5m" # Plus blinking
 
 
 echo "Welcome to Athena."


home help back first fref pref prev next nref lref last post