On 08 Apr 2002 21:38:22 -0500
Dave Sherman <[EMAIL PROTECTED]> Grabed a keyboard and said:

> On Mon, 2002-04-08 at 14:08, K Montgomery wrote:
> > I have a laptop that runs the netfs service on boot in order
> > to mount a remote Samba filesystem.  However, being a laptop,
> > it's not always connected to the network.
> > 
> > Can I make it so that if netfs fails to find the Samba server
> > on boot, it will attempt to connect repeatedly -- say, every 5
> > minutes -- in case I do connect to the network later?  I have
> > a little shell scripting experience, so any suggestions
> > involving that are welcome.
> 
> Create a script which will first check for the existence of your
> server and share ('smbclient -L //server', then parse the output
> to look for the correct share name). Then, if the server and
> share exist, run smbmount with the appropriate options to mount
> your samba server/share. Then, create a cron job that will run
> the script every 5 minutes.

Being the worlds slowest script writer. (wanna race... you'll
win!) I'd agree but do one thing different.  Set a variables
initial value to 0 then if the mount point doesn't exist it trys
to run the mount. ( a while loop maybe ) Sleeps for 6 minutes and
trys again if it finds the mount it returns 1 and it exits. If not
it does it again and again.
> 
> -- 
> Dave Sherman                          Beware the wrath of
> dragons, MCSE, MCSA, CCNA                        for you are
> crunchy,
>                                         and good with ketchup.
> "lynx -source http://sildara.dyndns.org/davepub.asc | gpg
> --import"
> 

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to