Re: mount usb stick

>

>> #!/bin/sh >> cnt=0 >> while [ 1 ] >> do >>   umount /mnt/usb0 >>   echo $cnt >>   mount /dev/sda1 /mnt/usb10 -t vfat > >You need to release the thread between the umount and mount commands, >otherwise the kernel doesn't get to act on your command before you issue a >new one:

What??

I have never before heard the suggestion that umount is asynchronous, and I'm not sure I believe it. Floppies couldn't be safely ejected if that were true.

>   umount /mnt/usb0 > >    sleep 1 # you may have to tune this value > >>   echo $cnt >>   mount /dev/sda1 /mnt/usb10 -t vfat > >If this approach fails, add a testing routine to assure that the umount was >successful before proceeding.

How would you propose to do that?

--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.
Reply to
Tim Roberts
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.