
Linux From Scratch - Version 7.0
259
}
################################################################################
# timespec() #
# #
# Purpose: An internal utility function to format a timestamp #
# a boot log file. Sets the STAMP variable. #
# #
# Return value: Not used #
################################################################################
timespec()
{
STAMP="$(echo `date +"%b %d %T %:z"` `hostname`) "
return 0
}
################################################################################
# log_success_msg() #
# Usage: log_success_msg ["message"] #
# #
# Purpose: Print a successful status message to the screen and #
# a boot log file. #
# #
# Inputs: $@ - Message #
# #
# Return values: Not used #
################################################################################
log_success_msg()
{
echo -n -e "${@}"
echo -e "${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
timespec
echo -e "${STAMP} ${@} OK" >> ${BOOTLOG}
return 0
}
log_success_msg2()
{
echo -n -e "${@}"
echo -e "${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
echo " OK" >> ${BOOTLOG}
return 0
}
################################################################################
# log_failure_msg() #
# Usage: log_failure_msg ["message"] #
# #
# Purpose: Print a failure status message to the screen and #
# a boot log file. #
# #
# Inputs: $@ - Message #
# #
# Return values: Not used #
################################################################################
Comentarios a estos manuales