summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test.block10
1 files changed, 10 insertions, 0 deletions
diff --git a/test.block b/test.block
index f6011a2221..781560dee1 100644
--- a/test.block
+++ b/test.block
@@ -7,6 +7,16 @@ BIN=./udev # location of your udev binary
export ACTION=add # 'add' or 'remove'
for i in ${SYSFSDIR}/block/*; do
+ # add each drive
export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
$BIN block
+
+ # add each partition, on each device
+ for j in $i/*; do
+ if [ -f $j/dev ]; then
+ export DEVPATH="/"`echo $j | \
+ cut --delimiter='/' --fields=3-`
+ $BIN block
+ fi
+ done
done