It is currently Tue, 17 May 2022 18:50:46 GMT

Author Message
 using mount in shell scripts
Hi all,

I'm doing a backup script for our local network (mixed W98/Linux).
I need to mount and umount smbfs network shares before rsync them.
The mount some time takes up to 10 sec.
How can I stop the executing of the script and wait until
the file system is really build ( or timeout it )?
Is there other way of doing that than checking if the mount
point is empty or not?
I tried using the exit code of mount but unsuccessful. It exits with 0
but files appear long time after that.

I would appreciate any idea/help.


 Sat, 11 Oct 2003 21:54:27 GMT   
 using mount in shell scripts
the easyest way i know of to have something wait is like this

function_to_do() {
do some stuff

mount /remote/a /local/a && function_to_do

that works in bash so if you are using ksh or something else you will
have to find the equivealent.

as far as a time out goes you will have to find a little alarm secript
with a timer and implament that in sepritly

--(Once apon a time, in,)--
                --(Filip Atanassov said it like only they can.)--

--(t...@faux.local_04:45_/home/faux)-- cat .sig
GUI's are for slackers. 6.1 on  
The easiest way to customize the command line.  By Faux_Pseudo

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson

 Sun, 12 Oct 2003 15:43:48 GMT   
   [ 2 post ] 

Similar Threads

1. using born shell script as login shell?

2. Newbie help with Shell scripts (using Korn shell)

3. Copy files using filenames from text files with shell script or bash script

4. shell script using another script

5. Convert Bash shell script to Korn shell script

6. shell script within shell script (general question)

7. Shell Script Help (C-Shell Script)

8. Shell script invoking other shell scripts

9. Mount nfs from crontab-shell Script

10. Shell script to invoke su and mount CD-ROM

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software