Magellan Linux

Diff of /trunk/busybox/mdev.rc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1234 by niro, Sun Aug 22 16:43:06 2010 UTC revision 1235 by niro, Fri Dec 10 23:03:22 2010 UTC
# Line 32  seed_dev() Line 32  seed_dev()
32   evaluate_retval   evaluate_retval
33  }  }
34    
35    # This works for 2.6.15 kernels or greater
36    trigger_uevents()
37    {
38     local list=""
39     local i
40     local first
41     local last
42     local default
43    
44     # if you want real coldplug (with all modules being loaded for all
45     # devices in the system), uncomment out the next line.
46     #list="${lis}t $(echo /sys/bus/*/devices/*/uevent)"
47     list="${list} $(echo /sys/class/*/*/uevent)"
48     list="${list} $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"
49     for i in ${list}
50     do
51     case "${i}" in
52     */device/uevent)
53     # skip followed device symlinks
54     continue
55     ;;
56     */class/mem/*|*/class/tty/*)
57     first="${first} ${i}"
58     ;;
59     */block/md*)
60     last="${last} ${i}"
61     ;;
62     */*)
63     default="${default} ${i}"
64     ;;
65     esac
66     done
67    
68     # trigger the sorted events
69     for i in ${first} ${default} ${last}
70     do
71     echo "add" > "${i}"
72     done
73    }
74    
75  # main functions  # main functions
76  start_devicemanager()  start_devicemanager()
77  {  {
# Line 65  start_devicemanager() Line 105  start_devicemanager()
105   modprobe -q unix 2>/dev/null   modprobe -q unix 2>/dev/null
106   fi   fi
107    
108     rc_print "  Populating /dev with existing devices through uevents ..."
109     trigger_uevents
110    
111   rc_print "  Starting mdev ..."   rc_print "  Starting mdev ..."
112   /sbin/mdev -s   /sbin/mdev -s
113   evaluate_retval   evaluate_retval

Legend:
Removed from v.1234  
changed lines
  Added in v.1235