1 
 2         if test -x "$(which mdev)"; then
 3                 mdev -s
 4                 echo "Looking for block devices..."
 5                 sleep 10
 6                 if test -f "/proc/sys/kernel/hotplug"; then
 7                         echo "$(which mdev)" > /proc/sys/kernel/hotplug
 8                 fi
 9         else
10                 for nod in "/sys/block/"*; do
11                         dev="${nod##*/}"
12                         block=""
13                         major=""
14                         minor=""
15                         read block < "$nod/dev"
16                         major="${block%:*}"
17                         minor="${block#*:}"
18                         mknod "/dev/$dev" "b" "$major" "$minor"
19                 done
20                 unset nod dev block major minor
21         fi