3 # test.block - run udev(8) on each block device in /sys/block
7 echo "usage: $0 <action>"
8 echo "where <action> is \"add\" or \"remove\""
13 SYSFSDIR=/sys # change this for a nonstand sysfs mount point
14 BIN=../udev # location of your udev binary
15 export ACTION=$1 # 'add' or 'remove'
17 for i in ${SYSFSDIR}/block/*; do
19 export DEVPATH=${i#${SYSFSDIR}}
22 # add each partition, on each device
24 if [ -f $j/dev ]; then
25 export DEVPATH=${j#${SYSFSDIR}}