Try using a read sub-task to read the prompt you expect (or part of it) 
before you write...it may be blocking indefinitely, and may not be 
aware that the connection is live...just an idea.

John

-----Original Message-----
From: gary [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 8:59 AM
To: ant-user
Cc: gary
Subject: Telnet task problem


I am trying to get my ant script to telnet into another box and run a
script. It appears to login (I can't be certain) but doesn't run any 
command
that I enter in a write tag. I've tried simpler things than running my
script, such as touch, without success. The only indication that I have 
that
anything is happening on the remote box is the following in my
/var/log/messages file:
Apr 23 14:54:59 stellar PAM_pwdb[15186]: (login) session opened for user
backup by (uid=0)
Apr 23 14:54:59 stellar inetd[14766]: pid 15185: exit status 1

The relevant section from my build.xml is:
<target name="telnet" depends="init" >
   <telnet server="server.name" userid="backup" password="badpass" >
      <write>touch testfile </write>
   </telnet>
</target>

I am using
Ant 1.3 on Win2000 Prof
Telneting to RedHat Linux 6.2

Any ideas anyone?
TIA
Gary

------------------------------------
Gary Lawson
Development Support Engineer
Sferics
www.sferics.com

Reply via email to