ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CONANT,PATRICK (HP-FtCollins,ex1)" <patrick.con...@hp.com>
Subject RE: Telnet Task Issue
Date Thu, 29 Jan 2004 23:17:38 GMT
You might try reading something back to prevent the telnet connection from
being closed before the commands are received by the remote system.  Try
replacing your "<read/>" elements with "<read>blahblahblah</read>" where
"blahblahblah" is what you expect to be sent from the telnet server to the
client after each command is executed (e.g. a command prompt or the output
of the previous command).

--p.


-----Original Message-----
From: Conelly, Luis (PS, GNF, Contractor) [mailto:Luis.Conelly@gnf.com] 
Sent: Thursday, January 29, 2004 3:56 PM
To: user@ant.apache.org
Subject: Telnet Task Issue


Hi all,

    I am having an issue with <telnet> task. I am trying to execute a simple
script via ant to a *nix server [Red Hat Linux release 7.2 (Enigma)] 

    This is the snippet of the script:

    <target name="callScript">
  	<telnet userid="${user.id}" password="${user.id}"
server="${target.server}">
         <read/>
         <write echo="true"> sh /scripts/k2kftp.sh </write>
         <read/>
         <write echo="true">exit</write>
      </telnet>
    </target>

    And the output looks like:

Buildfile: telnet_tools.xml

callScript:
   [telnet] Red Hat Linux release 7.2 (Enigma)
   [telnet] Kernel 2.4.7-10 on an i686
   [telnet] login:
   [telnet] xxxxxx
   [telnet]  Password:

   [telnet]  sh /scripts/k2kftp.sh

   [telnet] exit

BUILD SUCCESSFUL
Total time: 1 second

	However, the script does not get executed. I have tried to execute
simpler [such as ls], but it doesn't get a thing. Does anybody has an idea
about why is this happening?

	Regards
	-Luis

Settings:
	Workstation OS: Win2K Pro
	Ant: 1.6beta2
	JDK: 1.4.1_02
	Server OS: Red Hat Linux release 7.2 (Enigma)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message