Index: bootscripts/lfs/lib/services/init-functions
===================================================================
--- bootscripts/lfs/lib/services/init-functions	(revision 5cf7fc14966e52ffb054089b31c8c3bba2fbab85)
+++ bootscripts/lfs/lib/services/init-functions	(revision 9813d5e3286943ca93588175603e1fec966d1e49)
@@ -44,4 +44,5 @@
 SET_WCOL="\\033[${WCOL}G"    # at the $WCOL char
 CURS_UP="\\033[1A\\033[0G"   # Up one line, at the 0'th char
+CURS_ZERO="\\033[0G"
 
 ## Set color commands, used via echo
@@ -60,4 +61,10 @@
 INFO="\\033[1;36m"           # Information is light cyan
 BRACKET="\\033[1;34m"        # Brackets are blue
+
+# Use a colored prefix
+BMPREFIX="     "
+SUCCESS_PREFIX="${SUCCESS}  *  ${NORMAL}"
+FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
+WARNING_PREFIX="${WARNING} *** ${NORMAL}"
 
 BOOTLOG=/run/var/bootlog
@@ -172,5 +179,4 @@
 
     # Do the start!
-
     nice -n "${nice}" "${@}"
 }
@@ -471,6 +477,4 @@
 #         pathname, path to the specified program                              #
 #                                                                              #
-# Note: Output to stdout.  Not logged.                                         #
-#                                                                              #
 # Return values:                                                               #
 #       0 - Status printed                                                     #
@@ -479,21 +483,30 @@
 statusproc()
 {
+   local pidfile
+   local pidlist
+
    if [ "${#}" = "0" ]; then
-      echo "Usage: statusproc {program}"
+      echo "Usage: [-p pidfle] statusproc {program}"
       exit 1
    fi
 
-    local pidfile
-    local pidlist
-
-    # Process arguments
-    while true; do
-      case "${1}" in
-
-          -p)
-              pidfile="${2}"
-              shift 2
-              ;;
-      esac
+   # Process arguments
+   while true; do
+       case "${1}" in
+
+           -p)
+               pidfile="${2}"
+               shift 2
+               ;;
+
+           *)
+               if [ -n "${2}" ]; then
+                   echo "Too many arguments"
+                   return 1
+               else
+                   break
+               fi
+               ;;
+       esac
    done
 
@@ -517,5 +530,5 @@
             "/var/run/${base}.pid exists.${NORMAL}"
       else
-         if [ -z "${pidlist}" -a -n "${pidfile}" ]; then
+         if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
             echo -e "${WARNING}${1} is not running" \
                "but ${pidfile} exists.${NORMAL}"
@@ -554,9 +567,13 @@
 log_success_msg()
 {
-    echo -n -e "${@}"
-    echo -e "${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
+    echo -n -e "${BMPREFIX}${@}"
+    echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
+
+    # Strip non-printable characters from log file
+    local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
 
     timespec
-    echo -e "${STAMP} ${@} OK" >> ${BOOTLOG}
+    echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG}
+    
     return 0
 }
@@ -564,8 +581,9 @@
 log_success_msg2()
 {
-    echo -n -e "${@}"
-    echo -e "${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
+    echo -n -e "${BMPREFIX}${@}"
+    echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
 
     echo " OK" >> ${BOOTLOG}
+    
     return 0
 }
@@ -584,9 +602,13 @@
 log_failure_msg()
 {
-    echo -n -e "${@}"
-    echo -e "${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+    echo -n -e "${BMPREFIX}${@}"
+    echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+
+    # Strip non-printable characters from log file
 
     timespec
-    echo -e "${STAMP} ${@} FAIL" >> ${BOOTLOG}
+    local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
+    echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG}
+    
     return 0
 }
@@ -594,8 +616,9 @@
 log_failure_msg2()
 {
-    echo -n -e "${@}"
-    echo -e "${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
+    echo -n -e "${BMPREFIX}${@}"
+    echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
 
     echo "FAIL" >> ${BOOTLOG}
+    
     return 0
 }
@@ -612,9 +635,12 @@
 log_warning_msg()
 {
-    echo -n -e "${@}"
-    echo -e "${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
-
+    echo -n -e "${BMPREFIX}${@}"
+    echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
+
+    # Strip non-printable characters from log file
+    local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     timespec
-    echo -e "${STAMP} ${@} WARN" >> ${BOOTLOG}
+    echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG}
+    
     return 0
 }
@@ -631,16 +657,22 @@
 log_info_msg()
 {
+    echo -n -e "${BMPREFIX}${@}"
+
+    # Strip non-printable characters from log file
+    local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
+    timespec
+    echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG}
+    
+    return 0
+}
+
+log_info_msg2()
+{
     echo -n -e "${@}"
 
-    timespec
-    echo -n -e "${STAMP} ${@}" >> ${BOOTLOG}
-    return 0
-}
-
-log_info_msg2()
-{
-    echo -n -e "${@}"
-
-    echo -n -e "${@}" >> ${BOOTLOG}
+    # Strip non-printable characters from log file
+    local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
+    echo -n -e "${logmessage}" >> ${BOOTLOG}
+    
     return 0
 }
