|
@@ -23,28 +23,6 @@
|
|
|
umask 022
|
|
|
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
|
|
|
|
|
|
-## Screen Dimensions
|
|
|
-# Find current screen size
|
|
|
-if [ -z "${COLUMNS}" ]; then
|
|
|
- COLUMNS=$(stty size)
|
|
|
- COLUMNS=${COLUMNS##* }
|
|
|
-fi
|
|
|
-
|
|
|
-# When using remote connections, such as a serial port, stty size returns 0
|
|
|
-if [ "${COLUMNS}" = "0" ]; then
|
|
|
- COLUMNS=80
|
|
|
-fi
|
|
|
-
|
|
|
-## Measurements for positioning result messages
|
|
|
-COL=$((${COLUMNS} - 8))
|
|
|
-WCOL=$((${COL} - 2))
|
|
|
-
|
|
|
-## Set Cursor Position Commands, used via echo
|
|
|
-SET_COL="\\033[${COL}G" # at the $COL char
|
|
|
-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
|
|
|
# Please consult `man console_codes for more information
|
|
|
# under the "ECMA-48 Set Graphics Rendition" section
|
|
@@ -66,10 +44,12 @@ BMPREFIX=" "
|
|
|
SUCCESS_PREFIX="${SUCCESS} * ${NORMAL}"
|
|
|
FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
|
|
|
WARNING_PREFIX="${WARNING} *** ${NORMAL}"
|
|
|
+SKIP_PREFIX="${INFO} S ${NORMAL}"
|
|
|
|
|
|
SUCCESS_SUFFIX="${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
|
|
|
FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
|
|
|
WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
|
|
|
+SKIP_SUFFIX="${BRACKET}[${INFO} SKIP ${BRACKET}]${NORMAL}"
|
|
|
|
|
|
BOOTLOG=/run/bootlog
|
|
|
KILLDELAY=3
|
|
@@ -77,6 +57,28 @@ KILLDELAY=3
|
|
|
# Set any user specified environment variables e.g. HEADLESS
|
|
|
[ -r /etc/sysconfig/rc.site ] && . /etc/sysconfig/rc.site
|
|
|
|
|
|
+## Screen Dimensions
|
|
|
+# Find current screen size
|
|
|
+if [ -z "${COLUMNS}" ]; then
|
|
|
+ COLUMNS=$(stty size)
|
|
|
+ COLUMNS=${COLUMNS##* }
|
|
|
+fi
|
|
|
+
|
|
|
+# When using remote connections, such as a serial port, stty size returns 0
|
|
|
+if [ "${COLUMNS}" = "0" ]; then
|
|
|
+ COLUMNS=80
|
|
|
+fi
|
|
|
+
|
|
|
+## Measurements for positioning result messages
|
|
|
+COL=$((${COLUMNS} - 8))
|
|
|
+WCOL=$((${COL} - 2))
|
|
|
+
|
|
|
+## Set Cursor Position Commands, used via echo
|
|
|
+SET_COL="\\033[${COL}G" # at the $COL char
|
|
|
+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"
|
|
|
+
|
|
|
################################################################################
|
|
|
# start_daemon() #
|
|
|
# Usage: start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args...] #
|
|
@@ -645,6 +647,18 @@ log_warning_msg()
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
+log_skip_msg()
|
|
|
+{
|
|
|
+ /bin/echo -n -e "${BMPREFIX}${@}"
|
|
|
+ /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}"
|
|
|
+
|
|
|
+ # Strip non-printable characters from log file
|
|
|
+ logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
|
|
|
+ /bin/echo "SKIP" >> ${BOOTLOG}
|
|
|
+
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
################################################################################
|
|
|
# log_info_msg() #
|
|
|
# Usage: log_info_msg message #
|