TIP: Click on subject to list as thread! ANSI
echo: os2lan
to: Roy J. Tellason
from: Peter Knapper
date: 1999-10-25 14:51:18
subject: OS/2 & Samba under Linux

Hi Roy,

 PK> This is one annoyance I have with OS/2 networking, in that for 
 PK> an unattended server site it is not possible to configure a 
 PK> RELIABLE automatic retry option to automate connections via the 
 PK> WPS. To resolve this I always issue manual NET USE commands via 
 PK> STARTUP.CMD to connect to a resource at system startup and it 
 PK> loops (after a short delay) until those connections are 
 PK> established successfully.

 RJT> Do you have a CMD file snippet you would care to share?

I should have guessed you might ask.........;-) This is taken from my
Startup.Cmd file -
=================================================================

:Testit
If not exist Q:\Max\Bbs.Cmd Goto Tryagain
If not exist R:\Bbs\Max.Ctl Goto Tryagain
If not exist S:\Files\Uploads Goto Tryagain
If not exist T:\Msg\Nz\NzSysop.Sqd Goto Tryagain
Goto MapOk

:Tryagain
Sleep2 60
Echo *** Attempting to re-map BBS drives...
Net Use Q: \\BBS\BBS-C
Net Use R: \\BBS\BBS-D
Net Use S: \\BBS\BBS-E
Net Use T: \\BBS\BBS-F
Goto Testit

:MapOk
=================================================================

All it does is look for a file on each mapped drive to determine if the file
is accessible and acts accordingly. Sleep2 is a program that waits for x
seconds and then exits, in this case x = 60 seconds. There is also no harm in
attempting to re-map a drive that is already mapped.

 RJT> Your NET USE idea sounds good,  how does it tell when 
 RJT> it's been connected okay?

Well it wont exit the loop until it DOES find ALL the files... The NET USE
will display an error message within a few seconds if it can't find the
resource so all the mappings are attempted again, but other than the error
message there is no other adverse affect.

Cheers..........pk.


--- Maximus/2 3.01
* Origin: Another Good Point About OS/2 (3:772/1.10)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.