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

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Wed Jun 2 06:37:48 PDT 2004


nathan      04/06/02 07:37:48

  Modified:    bootscripts CHANGELOG
               bootscripts/lfs/init.d udev
  Log:
  Reorganizing the udev script again, to prevent pre hotplug events from
  wrecking a system
  
  Revision  Changes    Path
  1.93      +4 -0      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- CHANGELOG	2 Jun 2004 04:22:10 -0000	1.92
  +++ CHANGELOG	2 Jun 2004 13:37:47 -0000	1.93
  @@ -1,3 +1,7 @@
  +n/a - June 2, 2004
  +
  +	* Reorganize what goes on in the udev script
  +
   n/a - June 1, 2004
   
   	* removed usbfs from mountkernfs, and mountfs
  
  
  
  1.4       +8 -14     LFS/bootscripts/lfs/init.d/udev
  
  Index: udev
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/udev,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- udev	2 Jun 2004 04:22:10 -0000	1.3
  +++ udev	2 Jun 2004 13:37:47 -0000	1.4
  @@ -23,27 +23,21 @@
   
   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/hotplug > /proc/sys/kernel/hotplug
  -		else
  -			echo /sbin/udev > /proc/sys/kernel/hotplug
  -		fi
  -
  -		# Don't attempt to populate the /dev directory when something
  -		# else has already set it up.
  -		[ -f /dev/.udev.tdb ] && exit 0
  -
   		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
  +		grep -q " /dev " /proc/mounts || mount -n -t ramfs ramfs /dev
   
  +		# When the hotplug package isn't installed, make sure that udev
  +		# still gets hotplug events.
  +		if [ -x /sbin/hotplug ]; then
  +			echo /sbin/hotplug > /proc/sys/kernel/hotplug
  +		else
  +			echo /sbin/udev > /proc/sys/kernel/hotplug
  +		fi
   		# Populate /dev with all the devices that are already available,
   		# and save it's status so we can report failures.
   		udevstart || failed=1
  
  
  



More information about the lfs-book mailing list