4 # Check for missing binaries (stale symlinks should not happen)
5 UDEV_BIN=../wait_for_sysfs
6 test -x $UDEV_BIN || exit 5
8 # Directory where sysfs is mounted
12 # handle block devices and their partitions
13 for i in ${SYSFS_DIR}/block/*; do
15 export DEVPATH=${i#${SYSFS_DIR}}
18 # add each partition, on each device
20 if [ -f $j/dev ]; then
21 export DEVPATH=${j#${SYSFS_DIR}}
26 # all other device classes
27 for i in ${SYSFS_DIR}/class/*; do
28 # try adding empty classes, just to test stuff...
29 export DEVPATH=${i#${SYSFS_DIR}}
30 CLASS=`echo ${i#${SYSFS_DIR}} | cut --delimiter='/' --fields=3-`
35 export DEVPATH=${x#${SYSFS_DIR}}
36 CLASS=`echo ${i#${SYSFS_DIR}} | \
37 cut --delimiter='/' --fields=3-`