🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.netware.connectivity
Article #230

Re: Help: Communication between login script and external DOS commands

#230
From: Marcus I. Ryan
Date: Wed, 03 Jan 1996 00:00
47 lines
2601 bytes
In article <4ccsvb$q91@scctn01.sp.ac.sg>,
   s28454@nntpserver.sp.ac.sg (Dr Hu Yufan) wrote:
>Is there any way to pass some information from a external DOS command and 
>let the login script do different things base on this information?
>
>In UNIX, we have the exit code to be examined by shell's "if" command.
>In DOS batch file, a primitive "if errlevel".
>
>How to do the similar thing in Netware login script? Or is there any 
>better ways to pass some info from a DOS command executed in login script 
>to the login script?
>
>Thank you very much for your advisory.

There are several ways to approach this.  The login scripts do have
IF "%ERROR_LEVEL"<> "0" THEN ...
construct.  Another way I came up with the other day, but haven't tested yet 
uses the include statement in the login script.  I've not tested to see if 
INCLUDE can use a file off of the local hard drive, or if it has to be on the 
server, but one thought was to have your batch file do something like:
-------
REM NETSET sets up the user environment

NETSET
ECHO WRITE "Your TCP/IP settings are %TCPNAME% (%IP%)" > c:\temp\lscript2

REM The batch file will substitute the environment variables, so they need to 
REM be in BATCH file format, not Login Script format.
-------
and then put in the login script:
-------
INCLUDE "C:\TEMP\LSCRIPT2"
-------
which should execute C:\TEMP\LSCRIPT2 as though it were part of the login 
script.

Has anyone tried this?  Would it work?  I haven't had time to test it yet 
myself.


---------------------------------------------------------------
Marcus I. Ryan          |*The joy of engineering is finding a
Asst. SysAdmin, CCE Labs| straight line on a double-logarithmic
Iowa State University   | scale
shad@iastate.edu        |--------------------------------------
(515) 294-0715          | http://www.public.iastate.edu/~shad
---------------------------------------------------------------
Technical Details
Message-ID: <4ce37r$3rg@news.iastate.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4ccsvb$q91@scctn01.sp.ac.sg>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fe659,e6ebf889fbac8370
X-Google-Attributes: gidfe659,public
X-Google-Thread: fa939,e6ebf889fbac8370
X-Google-Attributes: gidfa939,public
X-Google-Thread: f8bf7,e6ebf889fbac8370
X-Google-Attributes: gidf8bf7,public
From: shad@iastate.edu (Marcus I. Ryan)
Subject: Re: Help: Communication between login script and external DOS commands
Date: 1996/01/03
Message-ID: <4ce37r$3rg@news.iastate.edu>
X-Deja-AN: 133830678
references: <4ccsvb$q91@scctn01.sp.ac.sg>
organization: Iowa State University
newsgroups: comp.os.netware.connectivity,comp.os.netware.misc,bit.listserv.novell