ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32163] - Telnet not working in Solaris
Date Wed, 10 Nov 2004 19:59:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32163>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32163

Telnet not working in Solaris

jax@well.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



------- Additional Comments From jax@well.com  2004-11-10 19:59 -------
Okay, I created this file:

==========================
<?xml version="1.0" standalone="yes"?>
<project name="TelnetTest" default="runtest" basedir=".">
  <target name="runtest" >
    <property name="pswd" value="******"/>
    <echo> Running telnet test.</echo>
    <telnet timeout="2" server="localhost" userid="jax" password="${pswd}">
      <read timeout="2">@mitra</read>
      <write>echo foo>bar</write>
      <read timeout="2"/>
     </telnet>
  </target>
</project>
==========================

Then I ran it like so:

==========================
Buildfile: ant-test-telnet.xml

runtest:
     [echo]  Running telnet test.
   [telnet] 
   [telnet] 
   [telnet] SunOS 5.9
   [telnet] 
   [telnet] 
   [telnet] login:
   [telnet] jax
   [telnet]  Password:
   [telnet]  
   [telnet] Last login: Wed Nov 10 12:45:02 from localhost
   [telnet] Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
   [telnet] [12:47:29 jax@mitra
   [telnet] echo foo>bar
==========================

Then I checked the results:

==========================
[12:52:42 jax@mitra:~]$ uname -a
SunOS mitra 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Blade-100 Solaris
[12:52:47 jax@mitra:~]$ ls -l bar
-rw-r--r--    1 jax      other           4 Nov 10 12:47 bar
[12:52:51 jax@mitra:~]$ cat bar
foo
==========================

So it works just fine for me. Possibly the problem is that you have not
conformed to the recommendations which accompany the Telnet task entry in the
Ant manual: "Always declare an opening and closing <read> element to ensure that
statements are not sent before the connection is ready, and that the connection
is not broken before the final command has completed." You have no closing
<read> element.

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


Mime
View raw message