summaryrefslogtreecommitdiff
path: root/test.block
blob: f6011a22213f2ce796233f1d6ed715fc3a74aec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
#
# test.block - run udev(8) on each block device in /sys/block

SYSFSDIR=/sys		# change this for a nonstand sysfs mount point
BIN=./udev		# location of your udev binary
export ACTION=add	# 'add' or 'remove'

for i in ${SYSFSDIR}/block/*; do
	export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
	$BIN block
done