- Timestamp:
- Mar 22, 2006, 12:48:17 PM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 4929f06
- Parents:
- c20d036
- Location:
- udev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
udev/udev
rc20d036 r124f8507 19 19 . /etc/sysconfig/rc 20 20 . ${rc_functions} 21 22 trigger_device_events() {23 # generate events with the sysfs trigger24 list=$(echo /sys/bus/*/devices/*/uevent)25 list="$list $(echo /sys/class/*/*/uevent)"26 list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"27 for i in $list; do28 case "$i" in29 */device/uevent|*\**)30 # skip followed device symlinks31 continue32 ;;33 34 */class/mem/*|*/class/tty/*)35 first="$first $i"36 ;;37 38 */block/md*)39 last="$last $i"40 ;;41 42 */*)43 default="$default $i"44 ;;45 esac46 done47 48 # trigger the sorted events49 for i in $first $default $last; do50 echo "add" > "$i"51 done52 }53 21 54 22 case "$1" in … … 80 48 81 49 # configure all devices 82 trigger_device_events 83 84 # until we know how to do better, just wait for _all_ events to finish 85 loop=300 86 while test -d /dev/.udev/queue; do 87 sleep 0.1; 88 test "$loop" -gt 0 || break 89 loop=$(($loop - 1)) 90 done 91 92 echo_ok 50 /sbin/udevtrigger 51 evaluate_retval 93 52 ;; 94 53 95 54 stop) 96 55 boot_mesg "Stopping udevd..." 97 echo "/sbin/hotplug" > /proc/sys/kernel/hotplug98 56 killproc /sbin/udevd 99 57 ;; -
udev/udev_retry
rc20d036 r124f8507 31 31 done 32 32 fi 33 evaluate_retval 33 loop=300 34 confirm=0 35 while true ; do 36 sleep 0.1 37 test -d /dev/.udev/queue && confirm=0 || confirm=$(( $confirm + 1 )) 38 loop=$(( $loop - 1 )) 39 test $loop -gt 0 || break 40 test $confirm -lt 10 || break 41 done 42 echo_ok 34 43 ;; 35 44 *)
Note:
See TracChangeset
for help on using the changeset viewer.