>
> Hi!
>
> I'm having some troubles getting hotplug to work correctly with usb-storage.
> It apparently notices that device is plugged as /proc/scsi/usb-storage/1
> exists:
>
> Host scsi1: usb-storage
> Vendor: Creative Tech
> Product: NOMAD MuVo
> Serial Number: 000000000000
> Protocol: Transparent SCSI
> Transport: Bulk
> Quirks:
>
> But there's no /dev/sda*, so that I could mount the device. I'm using
> 2.5.70-mm9 with usb-storage, usbcore, uhci-hcd, scsi-disk and scsi-generic
> compiled as modules. Running dmesg shows this:
>
I've just been trying to understand this too. As far as I know, you have
to use sg_map to create the /dev/sda entry. sg_map is part of sg3_utils.
I can't find an ebuild for it, but it builds from source with no
problem.
After emerging hotplug, I added the following file:
/etc/hotplug/usb/usb-storage
#!/bin/bash
exec >/tmp/hotplug 2>&1
# this fails for some mysterious reason, so we keep trying
# until it works
for ((c=10; c != 0; c--))
do
/bin/umount /mnt/photo
/usr/local/bin/sg_map
/bin/mount /mnt/photo
if [ $? == 0 ]
then
break;
else
sleep 10;
echo looping $c
fi
done
echo mount successful
find /mnt/photo -name "*.jpg" -exec cp {} /tmp \;
/bin/umount /mnt/photo
For some reason the mount doesn't always work. I'm strill trying to
figure that part out. Once it mounts, this script just copies all jpg's
to /tmp, but obviously you could do whatever you want.
I'm still trying to figure out how to know when the script is done. It
would be nice if the lights on teh CF reader would go out when it
unmounts, but that doesn't happen.
--
Chris Bare
[EMAIL PROTECTED]
--
[EMAIL PROTECTED] mailing list