r4206 - trunk/bootscripts/lfs/init.d

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Thu Sep 23 17:06:55 PDT 2004


Author: nathan
Date: 2004-09-23 18:06:54 -0600 (Thu, 23 Sep 2004)
New Revision: 4206

Modified:
   trunk/bootscripts/lfs/init.d/functions
Log:
Fixed boot_mesg alignment with color messages

Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions	2004-09-23 23:47:22 UTC (rev 4205)
+++ trunk/bootscripts/lfs/init.d/functions	2004-09-24 00:06:54 UTC (rev 4206)
@@ -80,10 +80,10 @@
 	# and calling CURS_UP that many times
 	# It will also append our new text onto the BOOTMESG variable
 	else
-		local length=`echo -e "$BOOTMESG" | sed -n -e "L ${WCOL}" |grep -c \$`
+		local length=`echo -e "$BOOTMESGCON" | sed -n -e "s/\$/\n/g;L ${WCOL}" |grep -c \$`
 		local count=0
 		BOOTMESG="${BOOTMESG}${1}"
-		BOOTMESGCON="${BOOTMESGCON}${2}${1}"
+		BOOTMESGCON="${BOOTMESGCON} \b${2} \b${1}"
 		while [ "${count}" -lt "${length}" ]; do
 			echo -e -n "$CURS_UP"
 			count=$((${count}+1))
@@ -91,7 +91,7 @@
 	fi
 
 	# This will wrap BOOTMESG to a maximum of $WCOL characters
-	echo -e "${BOOTMESGCON}" | sed -n -e "L ${WCOL}"
+	echo -e "${BOOTMESGCON}" | sed -n -e "s/\$/\n/g;L ${WCOL}"
 }
 
 boot_log()




More information about the lfs-book mailing list