Look for the hotplug scripts to replace your tail -f trick.

usb-storage can't tell you what /dev/sdX node it's got, because it doesn't
know.  Only the SCSI layer knows that.  You can parse /proc/scsi/scsi if
you want.

Matt

On Sun, Dec 09, 2001 at 01:44:16PM +0100, Rogier Wolff wrote:
> Rogier Wolff wrote:
> > [Bj_rn Stenberg] wrote:
> > [Charset ISO-8859-1 unsupported, filtering to ASCII...]
> > > Rogier Wolff wrote:
> > > 
> > > > I have a Sony F707 digital camera. A day of shooting results in about
> > > > 95M of pictures. Copying that over to my PC took 25 minutes. Thats
> > > > about 63kbytes per second.
> > > 
> > > Details, please. Which HCI driver are you using?
> >  
> > > 63k sounds like what I got when testing usb-storage with uhci.o. In
> > > the same test I got >700k with usb-uhci.o so you might want to try
> > > that.
> > 
> > Bjorn, 
> > 
> > Thanks for the tip! Now I'm getting about 6.5Mb per 10 seconds
> > now. Downloaded the whole bunch (95Mb) of images in 2.5
> > minutes.  That's more like it. :-)
> 
> OK Guys, I now have a script running that will automatically slurp my
> camera once it is connected: 
> 
> tail -0f /var/log/messages | \
>   awk '/Manufacturer: Sony DSC/ {system ("/home/wolff/bin/handle_sony")}' &
> 
> and: 
> 
> -----------------------------------------------
> #!/bin/sh
> mnt=/mnt/sony
> dst=/home/wolff/dsc/newimages/
> 
> (beep) > /dev/console &
> 
> mount /dev/sda1 $mnt
> for i in $mnt/*/*/
>   do
>   rsync -avv --progress $i $dst
> done
> 
> umount $mnt
> 
> (beep; sleep 1 ; beep) > /dev/console &
> -----------------------------------------------
> 
> The thing I don't like about this is that the "sda1" has to be
> guessed. Besides "usb-storage" I have 2 more SCSI interfaces in this
> machine, and the day that I'll add a permanent scsi disk (or something
> that looks like one) on one of them will come eventually.
> 
> So my feature request is: can the usb-storage driver spew out which
> sdX it got: that way I can make my script a bit more robust. 
> 
> I just realized, there is probably a "usbmgr" program that can replace
> my "tail -f / awk" trick. I just searched the web a bit but couldn't
> find anything easy / that can launch my other script. If it's trivial,
> please enlighten me... ;-)
> 
>                       Roger. 
> 
> -- 
> ** [EMAIL PROTECTED] ** http://www.BitWizard.nl/ ** +31-15-2137555 **
> *-- BitWizard writes Linux device drivers for any device you may have! --*
> * There are old pilots, and there are bold pilots. 
> * There are also old, bald pilots. 

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

THEY CASTRATED MY QUAKE BITS! I WANT THEM BACK!!!!
                                        -- Greg
User Friendly, 3/27/1998

Attachment: msg03215/pgp00000.pgp
Description: PGP signature

Reply via email to