blfs-bootscripts patch

James Robertson jwrober at linuxfromscratch.org
Thu Dec 9 06:50:03 PST 2004


Robert Connolly wrote:
> Hello. Please accept this patch for blfs-bootscripts. It adds setup for a new 
> frandom device that some people might have. It should get run just after the 
> random-seed script and before daemons. It doesn't need a stop script.
> 
> robert
> 
> 
> ------------------------------------------------------------------------
> 
> diff -Naur blfs-bootscripts-20041203.orig/Makefile blfs-bootscripts-20041203/Makefile
> --- blfs-bootscripts-20041203.orig/Makefile	2004-11-21 06:51:16.000000000 +0000
> +++ blfs-bootscripts-20041203/Makefile	2004-12-05 07:11:17.083335864 +0000
> @@ -124,6 +124,14 @@
>  	ln -sf  ../init.d/fcron ${EXTDIR}/rc.d/rc5.d/S40fcron
>  	ln -sf  ../init.d/fcron ${EXTDIR}/rc.d/rc6.d/K08fcron
>  
> +install-frandom: create-dirs
> +	install -m ${MODE} blfs/init.d/frandom      ${EXTDIR}/rc.d/init.d/
> +	ln -sf  ../init.d/frandom ${EXTDIR}/rc.d/rc1.d/S26frandom
> +	ln -sf  ../init.d/frandom ${EXTDIR}/rc.d/rc2.d/S26frandom
> +	ln -sf  ../init.d/frandom ${EXTDIR}/rc.d/rc3.d/S26frandom
> +	ln -sf  ../init.d/frandom ${EXTDIR}/rc.d/rc4.d/S26frandom
> +	ln -sf  ../init.d/frandom ${EXTDIR}/rc.d/rc5.d/S26frandom
> +
>  install-gdm: create-dirs
>  	install -m ${MODE} blfs/init.d/gdm        ${EXTDIR}/rc.d/init.d/
>  	ln -sf  ../init.d/gdm ${EXTDIR}/rc.d/rc0.d/K05gdm
> @@ -425,6 +433,7 @@
>  	install-dhcp \
>  	install-exim \
>  	install-fcron \
> +	install-frandom \
>  	install-gdm \
>  	install-gpm \
>  	install-heimdal \
> diff -Naur blfs-bootscripts-20041203.orig/blfs/init.d/frandom blfs-bootscripts-20041203/blfs/init.d/frandom
> --- blfs-bootscripts-20041203.orig/blfs/init.d/frandom	1970-01-01 00:00:00.000000000 +0000
> +++ blfs-bootscripts-20041203/blfs/init.d/frandom	2004-12-05 07:15:17.776737272 +0000
> @@ -0,0 +1,27 @@
> +#!/bin/sh
> +# Begin $rc_base/init.d/frandom
> +
> +# Based on random script from BLFS bootscripts. Originally written by
> +# Gerard Beekmans and Larry Lawrence. Modified for frandom by
> +# Robert Connolly.
> +
> +. /etc/sysconfig/rc
> +. $rc_functions
> +
> +case "$1" in
> +	start)
> +		echo "Creating the erandom & frandom devices and seeding them..."
> +			/bin/mknod /dev/frandom c 235 11 
> +			/bin/mknod /dev/erandom c 235 12

Wouldn't you test for existence first?  If they don't then create, 
otherwise don't do anything.

> +			/bin/dd if=/dev/frandom of=/dev/null \
> +			count=1 &>/dev/null
> +		evaluate_retval
> +		;;
> +                
> +	*)
> +		echo "Usage: $0 start"
> +		exit 1
> +		;;
> +esac
> +
> +# End $rc_base/init.d/frandom
> 

Thanks
James
-- 
James Robertson -- jwrober at linuxfromscratch dot org
Reg. Linux User -- #160424 -- http://counter.li.org
Reg. LFS User   -- #6981   -- http://www.linuxfromscratch.org
LFS Bugzilla Maintainer    -- http://{blfs-}bugs.linuxfromscratch.org



More information about the blfs-dev mailing list