________________________________
From: Willi Wasser <wiw...@web.de>
To: freedos-user@lists.sourceforge.net
Sent: Wed, March 16, 2011 4:12:27 PM
Subject: Re: [Freedos-user] ntool help


> hello,
> I want to use ntool to redirect output of dhcp to wattcp.cfg.
> I am confused by the -g command line option. what does <str> mean?
> does anyone know what I would enter, using ntool to redirect output of dhcp 
> to 
>wattcp.cfh?

The short answer is: NTOOL -g " " > WATTCP.CFG

Use one (or more) space characters enclosed in a pair of quotatation marks for 
<str>. This would give you something like:

MY_IP=192.168.1.1
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
NAMESERVER=192.76.23.54

i just tried to run ntool and i got back an ip address of:
MY_IP=0.0.0.0

i am trying to run lynx, and when i try to start lynx i get an error saying all 
attempts at getting an ip address have failed. the ntool command i used was

ntool -g " " > C:\FDOS\LYNX\WATTCP.CFG

i have typed out the wattcp.cfg file after running ntool and it says my ip as 
alll zeroes.
another question,
when using ntool to get info for wattcp.cfg i first am running ntool with the 
-g 
command line option, 
then i use the set command to set wattcp.cfg to where i had ntool redirect the 
info to, and then i try to start lynx. i am just wondering, in regards to my 
info should that work, i was thinking like you suggested of somehow writing 
some 
batch files if i could get lynx up and running. but i havent been able to start 
it yet.

btw i used mTCP to get my network info. and that seems to be working.

thanks for the help.

which is exactly what you need as a (minimal) WATTCP.CFG file. If you need a 
more sohisticated WATTCP.CFG set-up, you could write a second file (say 
WATTCP0.CFG), that holds all those entries not provided by NTOOL. e.g. like 
this:

TXBUFSIZE=8196
RXBUFSIZE=8196
PRINTER1NAME=LPT1

you would then add some lines like the following ones to your start-up batch 
file:

NTOOL -g " "     >  WATTCP.CFG
TYPE WATTCP0.CFG >> WATTCP.CFG

please observe the double chevrons in the second line, they cause the content 
of 
the second file to be appended to the first one. Otherwise you would just 
clobber it.

Now, what is the purpose of <str> at all?

The long answer is: It gives you more flexibility. If it is anything but a 
string that consists only of blanks, then <str> will be prepended to each line 
of NTOOL's output. If you try e.g.

NTOOL -g "SET "

(mind the space between the "T" and the closing quotation mark) then you would 
get something like this:

SET MY_IP=192.168.1.1
SET NETMASK=255.255.255.0
SET GATEWAY=192.168.1.254
SET NAMESERVER=192.76.23.54

re-directing this into a batch file and then calling that (secondary) batchfile 
from the primary one like this:

NTOOL -g "SET "  > SETPARM.BAT
@CALL SETPARM.BAT

will cause environment variables to be set with the respective values. These 
variables can then be further processed (used) in many ways.

Or you try 

NTOOL -g "ECHO " > IPCONFIG.BAT

which would mimic the IPCONFIG commmand known from other TCP/IP implementations.

The reason for the somewhat confusing character of <str> is that the routine 
within NTOOL that parses the command line only supports command line switches 
(like -g) that have either allways an argument or never. Optional arguments are 
not supported. Therefore the "dummy" string is required, even if you actually 
don't want to prepend anything. But i think, this is just an inconvenience, not 
a real problem.

BTW, do you know the meaning of the acronym RTFM?  :-)

no. maybe rich text something? i dont know?


___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user



      
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to