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

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Wed Sep 22 13:07:28 PDT 2004


Author: nathan
Date: 2004-09-22 14:07:27 -0600 (Wed, 22 Sep 2004)
New Revision: 4190

Modified:
   trunk/bootscripts/CHANGELOG
   trunk/bootscripts/lfs/init.d/functions
Log:
Removed a dependency on wc, replaced with grep

Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG	2004-09-22 12:46:57 UTC (rev 4189)
+++ trunk/bootscripts/CHANGELOG	2004-09-22 20:07:27 UTC (rev 4190)
@@ -1,3 +1,6 @@
+n/a - September 22, 2004
+	* Removed the dependency on wl by replacing it with grep (Bryan Kadzban)
+
 n/a - September 21, 2004
 	* boot_mesg has been enhanced.  Subsequent calls will overwrite previous text,
 	  and it will wrap text based upon the variable ${WCOL}.

Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions	2004-09-22 12:46:57 UTC (rev 4189)
+++ trunk/bootscripts/lfs/init.d/functions	2004-09-22 20:07:27 UTC (rev 4190)
@@ -55,8 +55,8 @@
 #
 # Outputs:      Standard Output
 #
-# Dependencies: - wc, for counting \n's in a variable
-#               - $WCOL, from functions
+# Dependencies: - grep, for counting \n's in a variable
+#               - $WCOL, for max line length, from functions
 #
 # Todo:         - This function was created for the purpose of storing
 #               information to be passed to a bootup log.  The logging support
@@ -76,7 +76,7 @@
 	# and calling CURS_UP that many times
 	# It will also append our new text onto the BOOTMESG variable
 	else
-		local length=`echo -e "$BOOTMESG" | wc -l`
+		local length=`echo -e "$BOOTMESG" | grep -c \$`
 		local count=0
 		BOOTMESG="$BOOTMESG $@"
 		while [ "${count}" -lt "${length}" ]; do




More information about the lfs-book mailing list