cvs commit: LFS/bootscripts/lfs/init.d udev cleanfs

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Tue May 4 15:15:03 PDT 2004


nathan      04/05/04 16:15:03

  Modified:    bootscripts CHANGELOG Makefile
               bootscripts/lfs/init.d cleanfs
  Added:       bootscripts/lfs/init.d udev
  Removed:     bootscripts/contrib/init.d udev
  Log:
  Moved udev from lfs to contrib, added udev group to cleanfs
  
  Revision  Changes    Path
  1.67      +3 -0      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- CHANGELOG	4 May 2004 07:40:36 -0000	1.66
  +++ CHANGELOG	4 May 2004 22:15:03 -0000	1.67
  @@ -1,6 +1,9 @@
   n/a - May 4, 2004
   
   	* Update to the console script, prevent install of the console script
  +	* chgrp's udev, /var/run/udev, if udev is a valid group, suggested by
  +	  Zack
  +	* Moved udev from contrib to lfs
   
   n/a - April 30, 2004
   
  
  
  
  1.35      +3 -5      LFS/bootscripts/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/Makefile,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Makefile	4 May 2004 07:40:36 -0000	1.34
  +++ Makefile	4 May 2004 22:15:03 -0000	1.35
  @@ -28,6 +28,7 @@
   	install -m 754 lfs/init.d/swap         ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/sysklogd     ${EXTDIR}/rc.d/init.d/
   	install -m 754 lfs/init.d/template     ${EXTDIR}/rc.d/init.d/
  +	install -m 754 lfs/init.d/udev         ${EXTDIR}/rc.d/init.d
   	ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc0.d/K40sysklogd
   	ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K50network
   	ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/K60sendsignals
  @@ -53,6 +54,7 @@
   	ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc6.d/K90localnet
   	ln -sf ../init.d/reboot      ${EXTDIR}/rc.d/rc6.d/K99reboot
   	ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
  +	ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcsysinit.d/S10udev
   	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
  @@ -366,11 +368,7 @@
   	install -m 644 contrib/sysconfig/modules ${EXTDIR}/rc.d/sysconfig
   	ln -sf  ../init.d/modules ${EXTDIR}/rc.d/rcsysinit.d/S15modules
   
  -install-udev: create-dirs
  -	install -m 754 contrib/init.d/udev ${EXTDIR}/rc.d/init.d
  -	ln -sf  ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev
  -
   .PHONY: install \
   	install-service-dhclient install-service-dhcpcd install-service-ipx install-service-pppoe \
   	install-alsa install-apache install-bind install-cups install-dhcp install-exim install-fcron install-gdm install-gpm install-heimdal install-lprng install-mysql install-netfs install-nfs-client install-nfs-server install-ntp install-portmap install-postfix install-postgresql install-proftpd install-random install-rsync install-samba install-sendmail install-sshd install-xinetd \
  -	install-modules install-udev
  +	install-modules
  
  
  
  1.9       +5 -1      LFS/bootscripts/lfs/init.d/cleanfs
  
  Index: cleanfs
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/cleanfs,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- cleanfs	8 Apr 2004 20:43:56 -0000	1.8
  +++ cleanfs	4 May 2004 22:15:03 -0000	1.9
  @@ -47,8 +47,12 @@
   		evaluate_retval
   
   		echo "Creating new /var/run/utmp..."
  -		> /var/run/utmp && chmod 644 /var/run/utmp
  +		> /var/run/utmp
   		evaluate_retval
  +		if grep -q '^utmp:' /etc/group ; then
  +			chmod 0664 /var/run/utmp
  +			chgrp utmp /var/run/utmp
  +		fi
   
   		echo "Removing possible /etc/nologin /fastboot and /forcefsck..."
   		rm -f /etc/nologin /fastboot /forcefsck
  
  
  
  1.1                  LFS/bootscripts/lfs/init.d/udev
  
  Index: udev
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/udev - Udev cold-plugging script
  
  # Written by Zack Winkles  - winkie at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  # Assure that sysfs is mounted and that udev is present.
  [ -d /sys/block -a -x /sbin/udev ] || exit 0
  
  # Create some things that sysfs does not, and should not export for us.  Feel
  # free to add devices to this list.
  make_extra_nodes() {
  	ln -s /proc/self/fd /dev/fd
  	ln -s /proc/self/fd/0 /dev/stdin
  	ln -s /proc/self/fd/1 /dev/stdout
  	ln -s /proc/self/fd/2 /dev/stderr
  	ln -s /proc/kcore /dev/core
  	mkdir /dev/pts
  	mkdir /dev/shm
  }
  
  case "$1" in
  	start)
  		# When the hotplug package isn't installed, make sure that udev
  		# still gets hotplug events.
  		if [ ! -x /sbin/hotplug ]; then
  			echo /sbin/udev > /proc/sys/kernel/hotplug
  		fi
  
  		echo "Populating /dev with device nodes..."
  
  		# Mount a temporary file system over /dev, so that any devices
  		# made or removed during this boot don't affect the next one.
  		# The reason we don't write to mtab is because we don't ever
  		# want /dev to be unavailable (such as by `umount -a').
  		mount -n -t ramfs ramfs /dev
  
  		# Populate /dev with all the devices that are already available,
  		# and save it's status so we can report failures.
  		udevstart || failed=1
  
  		# Now, create some required files/directories/devices that sysfs
  		# doesn't export for us.
  		make_extra_nodes
  
  		# When reporting the status, base it on the success or failure
  		# of the `udevstart' command, since that's the most important.
  		(exit $failed)
  		evaluate_retval
  		;;
  	*)
  		echo "Usage $0 {start}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/udev
  
  
  



More information about the lfs-book mailing list