Author: dj
Date: 2006-04-13 19:56:36 -0600 (Thu, 13 Apr 2006)
New Revision: 7514

Modified:
   trunk/bootscripts/CHANGELOG
   trunk/bootscripts/Makefile
   trunk/bootscripts/lfs/init.d/udev
Log:
udev_udapte

Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG 2006-04-13 21:05:53 UTC (rev 7513)
+++ trunk/bootscripts/CHANGELOG 2006-04-14 01:56:36 UTC (rev 7514)
@@ -1,6 +1,17 @@
+n/a - April 14, 2006
+        * Merged changes from udev_update branch (DJ Lucas)
+       * Replaced a return with an exit and reversed comment changes in 
+          udev bootscript. (Dan Nicholson)
+       * Replaced walk_sysfs function in udev bootscript with new udevtrigger
+          program and move wait_for_uevents function inline. (DJ Lucas)
+       * Removed extra evaluate_retval in udev bootscript. (Ken Moffat)
+       * Wait for uevents to be processed in the udev script.  See ticket #1720
+         for details. (Matthew Burgess)
+
 n/a - March 21, 2006
-       * Removed old references to boot_log function and arguments passed
-         to boot_mesg_flush in echo_* functions.
+        * Removed old references to boot_log function and arguments passed
+          to boot_mesg_flush in echo_* functions. (DJ Lucas)
+
 n/a - March 10, 2006
        * Moved src argument to ipv4-static-route service script and 
           removed from ipv4-static service script. (DJ Lucas)

Modified: trunk/bootscripts/Makefile
===================================================================
--- trunk/bootscripts/Makefile  2006-04-13 21:05:53 UTC (rev 7513)
+++ trunk/bootscripts/Makefile  2006-04-14 01:56:36 UTC (rev 7514)
@@ -27,7 +27,6 @@
        install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
        install -m ${MODE} lfs/init.d/halt          ${EXTDIR}/rc.d/init.d/
        install -m ${MODE} lfs/init.d/console       ${EXTDIR}/rc.d/init.d/
-       install -m ${MODE} lfs/init.d/hotplug       ${EXTDIR}/rc.d/init.d/
        install -m ${MODE} lfs/init.d/localnet      ${EXTDIR}/rc.d/init.d/
        install -m ${MODE} lfs/init.d/modules       ${EXTDIR}/rc.d/init.d/
        install -m ${MODE} lfs/init.d/mountfs       ${EXTDIR}/rc.d/init.d/
@@ -44,7 +43,6 @@
        install -m ${MODE} lfs/init.d/udev          ${EXTDIR}/rc.d/init.d/
        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K80network
        ln -sf ../init.d/sysklogd   ${EXTDIR}/rc.d/rc0.d/K90sysklogd
-       ln -sf ../init.d/hotplug     ${EXTDIR}/rc.d/rc0.d/S50hotplug
        ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
        ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc0.d/S70mountfs
        ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
@@ -62,7 +60,6 @@
        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/hotplug     ${EXTDIR}/rc.d/rc6.d/S50hotplug
        ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
        ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc6.d/S70mountfs
        ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
@@ -75,7 +72,6 @@
        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/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S50cleanfs
-       ln -sf ../init.d/hotplug     ${EXTDIR}/rc.d/rcsysinit.d/S55hotplug
        ln -sf ../init.d/setclock    ${EXTDIR}/rc.d/rcsysinit.d/S60setclock
        ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
        ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S80localnet

Modified: trunk/bootscripts/lfs/init.d/udev
===================================================================
--- trunk/bootscripts/lfs/init.d/udev   2006-04-13 21:05:53 UTC (rev 7513)
+++ trunk/bootscripts/lfs/init.d/udev   2006-04-14 01:56:36 UTC (rev 7514)
@@ -15,18 +15,6 @@
 . /etc/sysconfig/rc
 . ${rc_functions}
 
-# 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)
                boot_mesg "Populating /dev with device nodes..."
@@ -59,22 +47,56 @@
                        /etc/rc.d/init.d/halt stop
                fi
 
-               # Assign udevsend to get hotplug events. udevsend can manage 
the whole
-               # hotplug handling by taking over the kernel spawned event 
process
-               echo /sbin/udevsend > /proc/sys/kernel/hotplug
+               # Udev handles uevents itself, so we don't need to have
+               # the kernel call out to any binary in response to them
+               echo > /proc/sys/kernel/hotplug
 
-               # Populate /dev with all the devices that are already available,
-               # and save it's status so we can report failures.
-               udevstart || failed=1
+               # Copy static device nodes to /dev
+               cp -ar /lib/udev/devices/* /dev
 
-               # Now, create some required files/directories/devices that sysfs
-               # doesn't export for us.
-               make_extra_nodes
+               # Start the udev daemon to continually watch for, and act on,
+               # uevents
+               /sbin/udevd --daemon
 
-               # When reporting the status, base it on the success or failure
-               # of the `udevstart' command, since that's the most important.
-               (exit ${failed})
+               # Now traverse /sys in order to "coldplug" devices that have
+               # already been discovered
+               mkdir -p /dev/.udev/queue
+               /sbin/udevtrigger
+
+               # until we know how to do better, just wait for _all_ events 
+               #to finish
+               loop=300
+               confirm=0
+               while true ; do
+                       sleep 0.1
+                       test -d /dev/.udev/queue && confirm=0 || \
+                       confirm=$(( $confirm + 1 ))
+                       loop=$(( $loop - 1 ))
+                       test $loop -gt 0 || break
+                       test $confirm -lt 60 || break
+               done
+               > /dev/bug
+               test "$loop" -gt 0
+               failed="${?}"
+               sleep 6
+               if test -s /dev/bug; then
+                       mv /dev/bug /dev/bugreport
+                       failed="2"
+               else
+                       rm -f /dev/bug
+               fi
+               (exit "${failed}")
                evaluate_retval
+
+               if [ "${failed}" -eq "2" ]; then
+                       boot_mesg "Please paste the /dev/bugreport file to" 
${FAILURE}
+                       boot_mesg 
"http://wiki.linuxfromscratch.org/lfs/ticket/1720";
+                       boot_mesg "Otherwise, the next version of LFS may be 
unbootable on your system!"
+                       echo_failure
+                       sleep 10
+                       exit 1
+               fi
+
                ;;
 
        *)

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to