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\""
15 SYSFSDIR=/sys # change this for a nonstand sysfs mount point
16 BIN=./udevsend # location of your udev binary
17 export ACTION=$1 # 'add' or 'remove'
20 for i in ${SYSFSDIR}/block/*; do
22 export DEVPATH=${i#${SYSFSDIR}}
27 # add each partition, on each device
29 if [ -f $j/dev ]; then
30 export DEVPATH=${j#${SYSFSDIR}}