Re: mount usb stick

Sep 09, 2004 0 Replies


>


>> #!/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.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required