r4222 - in trunk/bootscripts: . lfs/init.d

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Sun Sep 26 23:05:19 PDT 2004


Author: nathan
Date: 2004-09-27 00:05:17 -0600 (Mon, 27 Sep 2004)
New Revision: 4222

Modified:
   trunk/bootscripts/CHANGELOG
   trunk/bootscripts/lfs/init.d/functions
Log:
boot_mesg no longer explicitly throws a \n on the end of each line

Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG	2004-09-27 06:01:19 UTC (rev 4221)
+++ trunk/bootscripts/CHANGELOG	2004-09-27 06:05:17 UTC (rev 4222)
@@ -5,6 +5,7 @@
 	* Added consolelog to contrib (DJ Lucas)
 	* loadproc and killproc can have the -nomsg parameter to avoid
 	  calling evaluate_retval or print_service (Jim Gifford)
+	* boot_mesg no longer explicitly adds a \n onto end of lines
 
 n/a - September 24, 2004
 	* Removed /dev/udev.tdb test

Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions	2004-09-27 06:01:19 UTC (rev 4221)
+++ trunk/bootscripts/lfs/init.d/functions	2004-09-27 06:05:17 UTC (rev 4222)
@@ -83,7 +83,7 @@
 	# and calling CURS_UP that many times
 	# It will also append our new text onto the BOOTMESG variable
 	else
-		local length=`echo -e "$BOOTMESGCON" | sed -n -e "s/\$/\n/g;L ${WCOL}" |grep -c \$`
+		local length=`echo -e -n "$BOOTMESGCON" | sed -n -e "s/\$/\n/g;L ${WCOL}" |grep -c \$`
 		local count=0
 		BOOTMESG="${BOOTMESG} \b${1}"
 		BOOTMESGCON="${BOOTMESGCON} \b${2} \b${1}"
@@ -94,7 +94,7 @@
 	fi
 
 	# This will wrap BOOTMESG to a maximum of $WCOL characters
-	echo -e "${BOOTMESGCON}" | sed -n -e "s/\$/\n/g;L ${WCOL}"
+	echo -e -n "${BOOTMESGCON}" | sed -n -e "s/\$/\n/g;L ${WCOL}"
 }
 
 boot_log()
@@ -104,7 +104,7 @@
 
 echo_ok()
 {
-	echo -e "${CURS_UP}""${SET_COL}""${BRACKET}""[""${SUCCESS}""  OK  ""${BRACKET}""]""${NORMAL}"
+	echo -e "${SET_COL}""${BRACKET}""[""${SUCCESS}""  OK  ""${BRACKET}""]""${NORMAL}"
 	if [ -z "${BOOTSERVICE}" ]; then
 		boot_log "${BOOTMESG}""  [  OK  ]"
 	else
@@ -117,7 +117,7 @@
 
 echo_failure()
 {
-	echo -e "${CURS_UP}""${SET_COL}""${BRACKET}""[""${FAILURE}""FAILED""${BRACKET}""]""${NORMAL}"
+	echo -e "${SET_COL}""${BRACKET}""[""${FAILURE}""FAILED""${BRACKET}""]""${NORMAL}"
 	if [ -z "${BOOTSERVICE}" ]; then
 		boot_log "${BOOTMESG}""  [FAILED]"
 	else
@@ -130,7 +130,7 @@
 
 echo_warning()
 {
-	echo -e "${CURS_UP}""${SET_WCOL}""$@""${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
+	echo -e "${SET_WCOL}""$@""${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
 	if [ -z "${BOOTSERVICE}" ]; then
 		boot_log "${BOOTMESG}""$@""  [ WARN ]"
 	else




More information about the lfs-book mailing list