Hi Roy,
PK> Sleep2 is a program that waits for x seconds and then exits, in
PK> this case x = 60 seconds.
RJT> Isn't there a command that's already likely to be on
RJT> my system that will do this? Something in REXX, maybe?
Yes, you can write the function in REXX using SysSleep(x) if you wish, however
at this point I wish to keep REXX out of the script.
PK> There is also no harm in attempting to re-map a drive that is
PK> already mapped.
RJT> Your NET USE idea sounds good, how does it tell when it's been
RJT> connected okay?
The NET USE just attempts the mapping and reports success or failure, but I
ignore that report and go looking for real data...
PK> Well it wont exit the loop until it DOES find ALL the files...
PK> The NET USE will display an error message within a few seconds
PK> if it can't find the resource so all the mappings are attempted
PK> again, but other than the error message there is no other
PK> adverse affect.
RJT> I may end up using a separate process, though, to run in the RJT>
background and see if the w95 box has been turned on and then to
RJT> establish that connection, if so, rather than
RJT> hanging up startup.cmd with continuing attempts to
RJT> access a machine that may not be turned on.
My STARTUP.CMD does not "hang-up", it actually performs various startup
functions including STARTing STARTUP2.CMD, which starts up the Requestor, logs
in a default user, maps the drives, removes old FLAG files, then EXITS the
STARTed session, so it runs as a seperate process and ends itself. It does not
hold up anything other than the functions it controls... You can set the wait
period to be anything you like if you want. In this case the CLIENT machine is
MUCH faster at starting up, so I frequently have it waiting about 4-5 mins
before the drives map ok. The only time the script failed me is when the
Server machine failed to restart after a power fail that required manual
intervention.
Another warning, if an OS/2 machine has TCP/IP AND NETBIOS configured, then
checking for network connectivity using TCP/IP (EG PING) is going to work LONG
before PEER Services (and subsequently the NET USE command) is up and running.
Cheers..............pk.
--- Maximus/2 3.01
* Origin: Another Good Point About OS/2 (3:772/1.10)
|