cvs commit: LFS/bootscripts/lfs/init.d console

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Tue May 4 00:40:36 PDT 2004


nathan      04/05/04 01:40:36

  Modified:    bootscripts CHANGELOG Makefile
               bootscripts/lfs/init.d console
  Log:
  Added Alexander's new console script
  
  Revision  Changes    Path
  1.66      +5 -0      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- CHANGELOG	1 May 2004 06:45:03 -0000	1.65
  +++ CHANGELOG	4 May 2004 07:40:36 -0000	1.66
  @@ -1,3 +1,7 @@
  +n/a - May 4, 2004
  +
  +	* Update to the console script, prevent install of the console script
  +
   n/a - April 30, 2004
   
   	* Moved the loadkeys script to console, and added setfont.  Contributed
  @@ -6,6 +10,7 @@
   n/a - April 29, 2004
   
   	* Added the heimdal init script.
  +	* Tagged as 2.0.5
   
   n/a - April 27, 2004
   
  
  
  
  1.34      +1 -1      LFS/bootscripts/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/Makefile,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Makefile	2 May 2004 00:07:31 -0000	1.33
  +++ Makefile	4 May 2004 07:40:36 -0000	1.34
  @@ -60,7 +60,7 @@
   	ln -sf ../init.d/setclock    ${EXTDIR}/rc.d/rcsysinit.d/S60setclock
   	ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
   	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
  -	install -m 644 lfs/sysconfig/console                         ${EXTDIR}/sysconfig/
  +	#install -m 644 lfs/sysconfig/console                         ${EXTDIR}/sysconfig/
   	install -m 644 lfs/sysconfig/createfiles                     ${EXTDIR}/sysconfig/
   	install -m 644 lfs/sysconfig/rc                              ${EXTDIR}/sysconfig/
   	install -m 754 lfs/sysconfig/network-devices/ifup            ${EXTDIR}/sysconfig/network-devices
  
  
  
  1.2       +22 -30    LFS/bootscripts/lfs/init.d/console
  
  Index: console
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/console,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- console	1 May 2004 06:45:04 -0000	1.1
  +++ console	4 May 2004 07:40:36 -0000	1.2
  @@ -3,48 +3,40 @@
   
   # Based on loadkeys script from LFS-3.1 and earlier.
   # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  -# Screen font and backspace-delete handling added by Alexander E. Patrakov
  +# Screen font added by Alexander E. Patrakov
   
   . /etc/sysconfig/rc
   . $rc_functions
  -if [ -f /etc/sysconfig/console ]; then
  -	. /etc/sysconfig/console
  +
  +# Native English speakers probably don't have /etc/sysconfig/console at all
  +if [ ! -f /etc/sysconfig/console ]
  +then
  +	exit 0
   fi
   
  +./etc/sysconfig/console
  +
   case "$1" in
   	start)
  -		echo -n "Loading keymap..."
  -		if [ -z $KEYMAP ]; then
  -			loadkeys -d
  +		if [ ! -z "$KEYMAP" ]
  +		then
  +			echo -n "Loading keymap..."
  +			loadkeys $KEYMAP
   			evaluate_retval
  -		else
  -( loadkeys $KEYMAP &&
  -cat <<"EOK" | loadkeys
  -                keycode 14 =    Delete  Delete          Delete  Delete
  -        alt     keycode 14 =    Meta_Delete
  -altgr   alt     keycode 14 =    Meta_Delete
  -                keycode 111 =   Remove
  -altgr   control keycode 111 =   Boot
  -control alt     keycode 111 =   Boot
  -altgr   control alt keycode 111 = Boot
  -EOK
  -) 2>/dev/null
  -		evaluate_retval
   		fi
  -
  -		if [ -z $FONT ]; then
  -			echo "FONT variable missing from /etc/sysconfig/console, using vga rom font"
  -		else
  -		echo "Setting screen font..."
  +		if [ ! -z "$KEYMAP_ CORRECTIONS" ]
  +		then
  +			echo -n "Correcting keymap..."
  +			loadkeys $KEYMAP_CORRECTION
  +			evaluate_retval
  +		fi
  +		if [ ! -z "$FONT" ]
  +		then
  +			echo -n "Setting screen font..."
   			setfont $FONT
   			evaluate_retval
  +		fi
   
  -			# The code below switches all virtual consoles to the alternate character set
  -			# For details, "man console_codes"
  -			for tty in /dev/tty[1-6]
  -			do
  -				echo -e -n '\033(K' >$tty 2>/dev/null
  -			done
   		;;
   	*)
   		echo "Usage: $0 {start}"
  
  
  



More information about the lfs-book mailing list