ppcrcd/trunk/initrd.dir/linuxrc

sparky cvs at pld-linux.org
Mon Feb 27 12:27:58 CET 2006


Author: sparky
Date: Mon Feb 27 12:27:57 2006
New Revision: 7033

Modified:
   ppcrcd/trunk/initrd.dir/linuxrc
Log:
- sync color names


Modified: ppcrcd/trunk/initrd.dir/linuxrc
==============================================================================
--- ppcrcd/trunk/initrd.dir/linuxrc	(original)
+++ ppcrcd/trunk/initrd.dir/linuxrc	Mon Feb 27 12:27:57 2006
@@ -8,27 +8,28 @@
 $B/mount -n -t proc proc /proc
 $B/awk '/debug/ { exit 0 }; { exit 1 }' /proc/cmdline && set -x
 
-red=''
-gre=''
-yel=''
-blu=''
-end=''
+esc=''
+cR="$esc[31m"
+cG="$esc[32m"
+cB="$esc[34m"
+cY="$esc[33m"
+cE="$esc[0m"
 
 
 error() {
-	$B/echo "${red}ERROR: $*${end}"
+	$B/echo "${cR}ERROR: $*${cE}"
 	$B/sh <$P/dev/console >$P/dev/console 2>&1
 }
 
 modload() {
-	$B/echo -n " ${blu}$1${end}"
+	$B/echo -n " ${cB}$1${cE}"
 	$B/insmod $P/lib/modules/$1.ko
 	$B/echo -n ".."
 }
 
 checkcd() {
 	FS=$1
-	$B/echo "${gre}*** Searching PPCRCD cdrom${end}"
+	$B/echo "${cG}*** Searching PPCRCD cdrom${cE}"
 	for CD in $DRIVES; do
 		$B/echo -n "$CD.."
 		$B/mount -n -t $FS $P/dev/$CD /media/ppcrcd -r
@@ -42,7 +43,7 @@
 }
 
 findcd() {
-	$B/echo "${gre}*** Checking for IDE cdrom${end}"
+	$B/echo "${cG}*** Checking for IDE cdrom${cE}"
 	$B/echo "Loading modules:"
 	for MOD in via82cxxx ide-generic cdrom ide-cd nls_base isofs; do
 		modload $MOD
@@ -58,7 +59,7 @@
 	checkcd iso9660
 	if $B/test -z "$FOUND"; then
 		$B/echo "Not found"
-		$B/echo "${gre}*** Checking for SCSI cdrom${end}"
+		$B/echo "${cG}*** Checking for SCSI cdrom${cE}"
 		$B/echo "Loading modules:"
 		for MOD in scsi_mod sr_mod mesh mac53c94; do
 			modload $MOD
@@ -71,7 +72,7 @@
 
 	if $B/test -z "$FOUND"; then
 		$B/echo "Not found"
-		$B/echo "${gre}*** Checking USB storage and hard drives${end}"
+		$B/echo "${cG}*** Checking USB storage and hard drives${cE}"
 		$B/echo "Loading modules:"
 		for MOD in sd_mod usbcore ohci-hcd ehci-hcd usb-storage \
 				hfs fat vfat; do
@@ -90,13 +91,13 @@
 		error "Can't find PPCRCD device"
 	fi
 
-	$B/echo "${gre}*** Preparing root filesystem${end}"
+	$B/echo "${cG}*** Preparing root filesystem${cE}"
 	$B/test -f /media/ppcrcd/ppcrcd.sqf || error "Can't find PPCRCD image"
 }
 
 ### MEMTEST #####################################
 if $B/awk '/memtest/ { exit 0 }; { exit 1 }' /proc/cmdline; then
-	$B/echo "${yel}***** Preparing memtest *****${end}"
+	$B/echo "${cY}***** Preparing memtest *****${cE}"
 	
 	findcd
 	
@@ -106,14 +107,14 @@
 	$B/umount /proc
 	cd /rootfs
 	$B/pivot_root . initrd
-	$B/echo "${yel}*** Executing memtest script${end}"
+	$B/echo "${cY}*** Executing memtest script${cE}"
 	exec /usr/sbin/chroot . /usr/lib/ppcrcd/memtest <dev/console >dev/console 2>&1
 fi
 
 $B/umount /proc
 
 ### NORMAL ######################################
-$B/echo "${yel}***** Preparing root *****${end}"
+$B/echo "${cY}***** Preparing root *****${cE}"
 
 # Prepare our new root
 mount -n -t tmpfs none /rootfs
@@ -134,7 +135,7 @@
 
 # prepare loop and mount
 if $B/awk "/tomempost/ { exit 0 }; { exit 1 }" /proc/cmdline; then
-	$B/echo "${gre}*** Copying ppcrcd.sqf image${end}"
+	$B/echo "${cG}*** Copying ppcrcd.sqf image${cE}"
 	$B/cat /media/ppcrcd/ppcrcd.sqf > /ppcrcd.sqf
 	$B/losetup $P/dev/loop7 /ppcrcd.sqf || error "Can't setup loop device"
 	TOMEM="yes"
@@ -148,7 +149,7 @@
 	$B/mount -n -t none -o bind live/$f $f
 done
 
-$B/echo "${gre}*** Preparing RW directories${end}"
+$B/echo "${cG}*** Preparing RW directories${cE}"
 # cp rw files
 /bin/cp -a /live/etc/skel /root
 /bin/chmod -R +w /root
@@ -177,7 +178,7 @@
 #/bin/umount /initrd
 #/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
 
-/bin/echo "${yel}*** Starting${end}"
+/bin/echo "${cY}*** Starting${cE}"
 
 exec /usr/sbin/chroot . /sbin/init <dev/console >dev/console 2>&1
 


More information about the pld-cvs-commit mailing list