|
@@ -87,6 +87,7 @@ function run()
|
|
|
DISTRO=${DISTRO:-"Linux From Scratch"}
|
|
|
DISTRO_CONTACT=${DISTRO_CONTACT:-"lfs-dev@linuxfromscratch.org (Registration required)"}
|
|
|
DISTRO_MINI=${DISTRO_MINI:-"LFS"}
|
|
|
+IPROMPT=${IPROMPT:-"no"}
|
|
|
|
|
|
# These 3 signals will not cause our script to exit
|
|
|
trap "" INT QUIT TSTP
|
|
@@ -112,11 +113,20 @@ if [ "$runlevel" == "6" -o "$runlevel" == "0" ]; then IPROMPT="no"; fi
|
|
|
if [ "$runlevel" == "S" ]; then dmesg -n "${LOGLEVEL:-7}"; fi
|
|
|
|
|
|
if [ "${IPROMPT}" == "yes" -a "${runlevel}" == "S" ]; then
|
|
|
- # dcol and icol are spaces before the message to center the
|
|
|
- # message on screen.
|
|
|
+ # The total length of the distro welcome string, without escape codes
|
|
|
+ wlen=${wlen:-$(echo "Welcome to ${DISTRO}" | wc -c )}
|
|
|
+ welcome_message=${welcome_message:-"Welcome to ${INFO}${DISTRO}${NORMAL}"}
|
|
|
|
|
|
+ # The total length of the interactive string, without escape codes
|
|
|
+ ilen=${ilen:-$(echo "Press 'I' to enter interactive startup" | wc -c )}
|
|
|
+ i_message=${i_message:-"Press '${FAILURE}I${NORMAL}' to enter interactive startup"}
|
|
|
+
|
|
|
+
|
|
|
+ # dcol and icol are spaces before the message to center the message
|
|
|
+ # on screen. itime is the amount of wait time for the user to press a key
|
|
|
wcol=$(( ( ${COLUMNS} - ${wlen} ) / 2 ))
|
|
|
icol=$(( ( ${COLUMNS} - ${ilen} ) / 2 ))
|
|
|
+ itime=${itime:-"3"}
|
|
|
|
|
|
echo -e "\n\n"
|
|
|
echo -e "\\033[${wcol}G${welcome_message}"
|