r1308 - / trunk/udev

jim at linuxfromscratch.org jim at linuxfromscratch.org
Wed Mar 22 13:01:20 PST 2006


Author: jim
Date: 2006-03-22 14:01:19 -0700 (Wed, 22 Mar 2006)
New Revision: 1308

Modified:
   /
   trunk/udev/
   trunk/udev/udev
   trunk/udev/udev_retry
Log:
 r2679 at server (orig r1308):  jim | 2006-03-22 12:48:17 -0800
  r2678 at server:  jim | 2006-03-22 12:40:49 -0800
  Updated for use with Udev 088
 



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - b6734a72-470d-0410-b049-f317dca95413:/:1307
   + b6734a72-470d-0410-b049-f317dca95413:/:1308


Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
   - 38c7b366-470d-0410-a457-935707c16d9b:/udev:2566
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263
   + 38c7b366-470d-0410-a457-935707c16d9b:/udev:2678
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263

Modified: trunk/udev/udev
===================================================================
--- trunk/udev/udev	2006-03-22 05:24:49 UTC (rev 1307)
+++ trunk/udev/udev	2006-03-22 21:01:19 UTC (rev 1308)
@@ -19,38 +19,6 @@
 . /etc/sysconfig/rc
 . ${rc_functions}
 
-trigger_device_events() {
-	# generate events with the sysfs trigger
-	list=$(echo /sys/bus/*/devices/*/uevent)
-	list="$list $(echo /sys/class/*/*/uevent)"
-	list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"
-	for i in $list; do
-	    case "$i" in
-		*/device/uevent|*\**)
-		    # skip followed device symlinks
-		    continue
-		    ;;
-
-		*/class/mem/*|*/class/tty/*)
-		    first="$first $i"
-		    ;;
-
-		*/block/md*)
-		    last="$last $i"
-		    ;;
-
-		*/*)
-		    default="$default $i"
-		    ;;
-	    esac
-	done
-
-	# trigger the sorted events
-	for i in $first $default $last; do
-	    echo "add" > "$i"
-	done
-}
-
 case "$1" in
     start)
 	boot_mesg "Creating /dev in tmpfs..."
@@ -79,22 +47,12 @@
 	mkdir -p /dev/.udev/queue
 
 	# configure all devices
-	trigger_device_events
-
-	# until we know how to do better, just wait for _all_ events to finish
-	loop=300
-	while test -d /dev/.udev/queue; do
-	    sleep 0.1;
-	    test "$loop" -gt 0 || break
-	    loop=$(($loop - 1))
-	done
-
-	echo_ok
+	/sbin/udevtrigger
+	evaluate_retval
 	;;
 
     stop)
 	boot_mesg "Stopping udevd..."
-	echo "/sbin/hotplug" > /proc/sys/kernel/hotplug
 	killproc /sbin/udevd
 	;;
 

Modified: trunk/udev/udev_retry
===================================================================
--- trunk/udev/udev_retry	2006-03-22 05:24:49 UTC (rev 1307)
+++ trunk/udev/udev_retry	2006-03-22 21:01:19 UTC (rev 1308)
@@ -30,7 +30,16 @@
 		test -e $device && echo "add" > $device
 	    done
 	fi
-	evaluate_retval
+	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 10 || break
+	done
+	echo_ok
 	;;
     *)
 	echo "Usage: $0 {start}"




More information about the cross-lfs mailing list