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

winkie at linuxfromscratch.org winkie at linuxfromscratch.org
Mon Jun 21 17:27:19 PDT 2004


winkie      04/06/21 18:27:19

  Modified:    bootscripts CHANGELOG
               bootscripts/lfs/init.d cleanfs mountfs
  Log:
  Added a big ol' ball of stuff--see the changelog
  
  Revision  Changes    Path
  1.108     +4 -4      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- CHANGELOG	21 Jun 2004 23:53:02 -0000	1.107
  +++ CHANGELOG	22 Jun 2004 00:27:18 -0000	1.108
  @@ -1,11 +1,11 @@
   n/a - June 21, 2004
   
  -	* Converted the udev script to use udevsend/udevd
  -
  -n/a - June 21, 2004
  -
   	* Re-ordered the "mount" and "echo" commands in the udev script, to
   	  prevent a possible race
  +	* Converted the udev script to use udevsend/udevd
  +	* Moved removal of /fastboot and /forcefsck to just after the root fs
  +	  becomes writable, and dropped the removal of /etc/nologin
  +	* Cleaned and tweaked both the output and actions of cleanfs
   
   n/a - June 20, 2004
   
  
  
  
  1.13      +16 -13    LFS/bootscripts/lfs/init.d/cleanfs
  
  Index: cleanfs
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/cleanfs,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- cleanfs	15 Jun 2004 16:36:31 -0000	1.12
  +++ cleanfs	22 Jun 2004 00:27:18 -0000	1.13
  @@ -43,25 +43,28 @@
   
   case "$1" in
   	start)
  -		echo "Removing /var/run/* and /var/lock/*"
  -		rm -rf /var/run/* /var/lock/*
  -		evaluate_retval
  +		echo -n "Cleaning file systems:"
  +
  +		echo -n " /tmp"
  +		cd /tmp &&
  +		find . -xdev -mindepth ! -name lost+found \
  +			-exec rm -rf {} \; || failed=1
  +
  +		echo -n " /var/lock"
  +		cd /var/lock &&
  +		find . -type f ! -newer /proc -exec rm -f {} \; || failed=1
   
  -		echo "Creating new /var/run/utmp..."
  +		echo " /var/run"
  +		cd /var/run &&
  +		find . ! -type d ! -name utmp ! -newer /proc \
  +			-exec rm -f {} \; || failed=1
   		> /var/run/utmp
  -		evaluate_retval
   		if grep -q '^utmp:' /etc/group ; then
  -			chmod 0664 /var/run/utmp
  +			chmod 664 /var/run/utmp
   			chgrp utmp /var/run/utmp
   		fi
   
  -		echo "Removing possible /etc/nologin /fastboot and /forcefsck..."
  -		rm -f /etc/nologin /fastboot /forcefsck
  -		evaluate_retval
  -
  -		echo "Removing /tmp/*"
  -		find /tmp -xdev -mindepth 1 -depth ! -path '/tmp/lost+found*' \
  -		  -exec rm -rf {} \;
  +		(exit $failed)
   		evaluate_retval
   
   		if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
  
  
  
  1.8       +3 -1      LFS/bootscripts/lfs/init.d/mountfs
  
  Index: mountfs
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/mountfs,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mountfs	2 Jun 2004 04:14:49 -0000	1.7
  +++ mountfs	22 Jun 2004 00:27:18 -0000	1.8
  @@ -13,6 +13,9 @@
   		mount -n -o remount,rw /
   		evaluate_retval
   
  +		# Remove fsck-related file system watermarks.
  +		rm -f /fastboot /forcefsck
  +
   		echo "Recording existing mounts in /etc/mtab..."
   		> /etc/mtab
   		mount -f / || failed=1
  @@ -22,7 +25,6 @@
   		fi
   		(exit $failed)
   		evaluate_retval
  -		# add /dev above if you use devfs
   
   		# This will mount all filesystems that do not have _netdev in
   		# their option list.  _netdev denotes a network filesystem.
  
  
  



More information about the lfs-book mailing list