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

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Wed May 19 20:10:34 PDT 2004


nathan      04/05/19 21:10:34

  Modified:    bootscripts CHANGELOG Makefile
  Added:       bootscripts/lfs/init.d random
  Log:
  Added the random bootscript to the lfs-bootscripts
  
  Revision  Changes    Path
  1.87      +4 -0      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- CHANGELOG	19 May 2004 02:32:53 -0000	1.86
  +++ CHANGELOG	20 May 2004 03:10:34 -0000	1.87
  @@ -1,3 +1,7 @@
  +n/a - May 19, 2004
  +
  +	* Added the random bootscript from blfs-bootscripts
  +
   n/a - May 18, 2004
   
   	* Fixed installation of modules configuration
  
  
  
  1.42      +6 -2      LFS/bootscripts/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/Makefile,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Makefile	19 May 2004 02:32:53 -0000	1.41
  +++ Makefile	20 May 2004 03:10:34 -0000	1.42
  @@ -22,6 +22,7 @@
   	install -m 754 lfs/init.d/mountkernfs  ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/network      ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/rc           ${EXTDIR}/rc.d/init.d/
  +	install -m 754 lfs/init.d/random       ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/reboot       ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/sendsignals  ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/setclock     ${EXTDIR}/rc.d/init.d/
  @@ -31,7 +32,8 @@
   	install -m 754 lfs/init.d/udev         ${EXTDIR}/rc.d/init.d
   	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc0.d/K90sysklogd
   	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K80network
  -	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
  +	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S50sendsignals
  +	ln -sf ../init.d/random      ${EXTDIR}/rc.d/rc0.d/S60random
   	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc0.d/S70mountfs
   	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
   	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc0.d/S90localnet
  @@ -48,7 +50,8 @@
   	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc5.d/S20network
   	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc6.d/K80network
   	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc6.d/K90sysklogd
  -	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
  +	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S50sendsignals
  +	ln -sf ../init.d/random      ${EXTDIR}/rc.d/rc6.d/S60random
   	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc6.d/S70mountfs
   	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
   	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc6.d/S90localnet
  @@ -58,6 +61,7 @@
   	ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcsysinit.d/S20swap
   	ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
   	ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
  +	ln -sf ../init.d/random      ${EXTDIR}/rc.d/rcsysinit.d/S45random
   	ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S50cleanfs
   	ln -sf ../init.d/setclock    ${EXTDIR}/rc.d/rcsysinit.d/S60setclock
   	ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
  
  
  
  1.1                  LFS/bootscripts/lfs/init.d/random
  
  Index: random
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/random
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # Random script elements by Larry Lawrence
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Initializing kernel random number generator..."
  		if [ -f /var/tmp/random-seed ]; then
  			cat /var/tmp/random-seed >/dev/urandom
  		fi
  		dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
  		evaluate_retval
  		;;
                  
  	stop)
  		echo "Saving random seed..."
  		dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
  		evaluate_retval
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/random
  
  
  



More information about the lfs-book mailing list