Author: dj
Date: 2011-11-28 02:05:32 -0700 (Mon, 28 Nov 2011)
New Revision: 9675
Modified:
trunk/BOOK/bootscripts/ChangeLog
trunk/BOOK/bootscripts/lfs/init.d/rc
trunk/BOOK/bootscripts/lfs/lib/services/init-functions
trunk/BOOK/bootscripts/lfs/sysconfig/rc.site
Log:
Revert previous change to init-functions and set defaults for interactive
prompt in rc
Modified: trunk/BOOK/bootscripts/ChangeLog
===================================================================
--- trunk/BOOK/bootscripts/ChangeLog 2011-11-28 08:16:50 UTC (rev 9674)
+++ trunk/BOOK/bootscripts/ChangeLog 2011-11-28 09:05:32 UTC (rev 9675)
@@ -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 <[email protected]>
Modified: trunk/BOOK/bootscripts/lfs/init.d/rc
===================================================================
--- trunk/BOOK/bootscripts/lfs/init.d/rc 2011-11-28 08:16:50 UTC (rev
9674)
+++ trunk/BOOK/bootscripts/lfs/init.d/rc 2011-11-28 09:05:32 UTC (rev
9675)
@@ -87,6 +87,7 @@
DISTRO=${DISTRO:-"Linux From Scratch"}
DISTRO_CONTACT=${DISTRO_CONTACT:-"[email protected] (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" == "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}"
Modified: trunk/BOOK/bootscripts/lfs/lib/services/init-functions
===================================================================
--- trunk/BOOK/bootscripts/lfs/lib/services/init-functions 2011-11-28
08:16:50 UTC (rev 9674)
+++ trunk/BOOK/bootscripts/lfs/lib/services/init-functions 2011-11-28
09:05:32 UTC (rev 9675)
@@ -61,11 +61,6 @@
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="[email protected]" # Bug report address
-DISTRO_MINI="LFS" # Short name used in filenames for distro config
-
# Use a colored prefix
BMPREFIX=" "
SUCCESS_PREFIX="${SUCCESS} * ${NORMAL}"
Modified: trunk/BOOK/bootscripts/lfs/sysconfig/rc.site
===================================================================
--- trunk/BOOK/bootscripts/lfs/sysconfig/rc.site 2011-11-28 08:16:50 UTC
(rev 9674)
+++ trunk/BOOK/bootscripts/lfs/sysconfig/rc.site 2011-11-28 09:05:32 UTC
(rev 9675)
@@ -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
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page