aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2011-11-28 09:05:32 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2011-11-28 09:05:32 +0000
commit701d877e61b6c55aa35c50ea531bfb6137f5a30c (patch)
tree6d01a10a4f528dca3af1dcb56106f3b9354c394d /bootscripts
parentd53a9b78a117f98321d37f99d088f18512f747b8 (diff)
Revert previous change to init-functions and set defaults for interactive prompt in rc
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9675 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r--bootscripts/ChangeLog3
-rw-r--r--bootscripts/lfs/init.d/rc14
-rw-r--r--bootscripts/lfs/lib/services/init-functions5
-rw-r--r--bootscripts/lfs/sysconfig/rc.site8
4 files changed, 17 insertions, 13 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog
index fa72d7e62..befc985b2 100644
--- a/bootscripts/ChangeLog
+++ b/bootscripts/ChangeLog
@@ -2,10 +2,9 @@
* lfs/init.d/mountfs: Add '-t nosysfs' to umount command
* lfs/init.d/mountvirtfs: remove unneeded spaces in output
- * lfs/init.d/rc: Correct double interactive prompt
+ * lfs/init.d/rc: Correct double interactive prompt and set prompt defaults
* lfs/init.d/setclock: Remove screen output from start case (udev)
* lfs/init.d/udev{,_retry}: Restore output to screen and log
- * lfs/lib/services/init-functions: Restore DISTRO variables
* lfs/sbin/ifup: Change "..." to ": " (not awaiting additonal output)
2011-11-14 Bruce Dubbs <bdubbs@linuxfromscratch.org>
diff --git a/bootscripts/lfs/init.d/rc b/bootscripts/lfs/init.d/rc
index cf01ba97e..e70278b8d 100644
--- a/bootscripts/lfs/init.d/rc
+++ b/bootscripts/lfs/init.d/rc
@@ -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}"
diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions
index 47546338c..9b200b414 100644
--- a/bootscripts/lfs/lib/services/init-functions
+++ b/bootscripts/lfs/lib/services/init-functions
@@ -61,11 +61,6 @@ FAILURE="\\033[1;31m" # Failures are red
INFO="\\033[1;36m" # Information is light cyan
BRACKET="\\033[1;34m" # Brackets are blue
-# Distro Information
-DISTRO="Linux From Scratch" # The distro name as displayed
-DISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report address
-DISTRO_MINI="LFS" # Short name used in filenames for distro config
-
# Use a colored prefix
BMPREFIX=" "
SUCCESS_PREFIX="${SUCCESS} * ${NORMAL}"
diff --git a/bootscripts/lfs/sysconfig/rc.site b/bootscripts/lfs/sysconfig/rc.site
index a897f9ddd..ea791e498 100644
--- a/bootscripts/lfs/sysconfig/rc.site
+++ b/bootscripts/lfs/sysconfig/rc.site
@@ -37,12 +37,12 @@
itime="3" # The ammount of time (in seconds) to display the prompt
# The total length of the distro welcome string, without escape codes
-wlen=$(echo "Welcome to ${DISTRO}" | wc -c )
-welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"
+#wlen=$(echo "Welcome to ${DISTRO}" | wc -c )
+#welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"
# The total length of the interactive string, without escape codes
-ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
-i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
+#ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
+#i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
# Set scripts to skip the file system check on reboot
#FASTBOOT=yes