| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 | # Begin /etc/default/rc# Global variable inherited by initscripts are in caps# Local variables for the rc script are in lowercase# Source site specific rc configuration. /etc/default/rc.site# Set base directory informationRC_BASE="/etc/rc.d"# Location of network device scripts and config filesNETWORK_DEVICES="/etc/network"# This sets default terminal options.# stty sane - this has been removed as nobody recalls# the reason for it in the first place - if no problems arize,# then it will be removed completely at a later date.# Setup default values for the environmentumask 022PATH="/bin:/sbin"# Find current screen sizeif [ -z "${COLUMNS}" ]; then        COLUMNS=$(stty size)        COLUMNS=${COLUMNS##* }fi# When using remote connections, such as a serial port, stty size returns 0if [ "${COLUMNS}" = "0" ]; then        COLUMNS=80fi## Measurements for positioning result messagesCOL=$((${COLUMNS} - 8))WCOL=$((${COL} - 2))# Set Cursur Position Commands, used via echo -eSET_COL="\\033[${COL}G"      # at the $COL charSET_WCOL="\\033[${WCOL}G"    # at the $WCOL charCURS_UP="\\033[1A\\033[0G"   # Up one line, at the 0'th char# Distro InformationDISTRO="Linux From Scratch" # The distro nameDISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report addressDISTRO_MINI="lfs" # Short name used in filenames for distro config# Define custom colors used in messages printed to the screenBRACKET="\\033[1;34m" # BlueFAILURE="\\033[1;31m" # RedINFO="\\033[1;36m"    # CyanNORMAL="\\033[0;39m"  # GreySUCCESS="\\033[1;32m" # GreenWARNING="\\033[1;33m" # Yellow# Prefix boot messages for easier reading on framebuffer consolesPREFIX_SUCCESS=" ${SUCCESS}*${NORMAL} "PREFIX_WARNING="${WARNING}**${NORMAL} "PREFIX_FAILURE="${FAILURE}***${NORMAL}"# Export the environment variables so they are inherited by the scriptsexport RC_BASE NETWORK_DEVICES PATH SET_COL SET_WCOL CURS_UPexport DISTRO DISTRO_CONTACT DISTRO_MINIexport BRACKET FAILURE INFO NORMAL SUCCESS WARNINGexport PREFIX_SUCCESS PREFIX_WARNING PREFIX_FAILURE# Interactive startupdlen="29" # The total length of the distro welcome stringilen="38" # The total length of the interactive messagewelcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"# FAILURE_ACTION (what to do when script failure occurs)case "${stop_on_error}" in    Y* | y* | 0)        FAILURE_ACTION='read Enter'    ;;    *)        FAILURE_ACTION='echo ""'    ;;esac# Error message displayed when a script's exit value is not zeroprint_error_msg(){    # ${link} and ${error_value} are defined by the rc script    echo -e "${FAILURE}FAILURE:  You should not be reading this error message."    echo -e ""    echo -e -n "${FAILURE}It means that an unforseen error took place in"    echo -e -n "${INFO} ${link}"    echo -e "${FAILURE},"    echo -e "${FAILURE}which exited with a return value of ${error_value}."    echo -e ""    echo -e -n "${FAILURE}If you are able to track this error down to a bug"    echo -e "${FAILURE}in one of the files"    echo -e -n "provided by ${INFO}${DISTRO}${FAILURE}, "    echo -e -n "${FAILURE}please be so kind to inform us at "    echo -e "${INFO}${DISTRO_CONTACT}${FAILURE}.${NORMAL}"    echo -e ""    echo -e "${INFO}Press Enter to continue..."    echo -e "${NORMAL}"    $FAILURE_ACTION}# End /etc/default/rc
 |