From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Love Date: Fri, 17 Oct 2003 23:18:48 +0000 Subject: Re: [patch] udev: cool test scripts Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Fri, 2003-10-17 at 18:58, Greg KH wrote: > Nice, thanks for the patch, I've applied it. Thanks. > But the test.block script doesn't catch any partitions on the block > devices :) Never happy! But for a fellow Gator... [19:07:52]root@phantasy:~/src/udev/udev# ./test.block [19:13:37]root@phantasy:~/src/udev/udev# ls /udev/hd* ls: /udev/hd*: No such file or directory [19:13:42]root@phantasy:~/src/udev/udev# ./test.block [19:13:53]root@phantasy:~/src/udev/udev# ls /udev/hd* /udev/hda /udev/hda2 /udev/hda4 /udev/hda6 /udev/hdd /udev/hda1 /udev/hda3 /udev/hda5 /udev/hdc test.block now recurses /sys/block, looking for partitions. Should add all drives and all partitions. Patch is against 003 plus last patch. Robert Love test.block | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -urN udev-cvs/test.block udev/test.block --- udev-cvs/test.block 2003-10-17 19:17:36.299032104 -0400 +++ udev/test.block 2003-10-17 19:18:16.672894344 -0400 @@ -7,6 +7,16 @@ export ACTION=ADd # 'add' or 'remove' =20 for i in ${SYSFSDIR}/block/*; do + # add each drive export DEVPATH=3D"/"`echo $i | cut --delimiter=3D'/' --fields=3D3-` $BIN block + + # add each partition, on each device + for j in $i/*; do + if [ -f $j/dev ]; then + export DEVPATH=3D"/"`echo $j | \ + cut --delimiter=3D'/' --fields=3D3-` + $BIN block + fi + done done ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise=20 Linux in the Boardroom; in the Front Office; & in the Server Room=20 http://www.enterpriselinuxforum.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel