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 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From [EMAIL PROTECTED] 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 [EMAIL PROTECTED] [telnet] echo foo>bar ========================== Then I checked the results: ========================== [12:52:42 [EMAIL PROTECTED]:~]$ uname -a SunOS mitra 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Blade-100 Solaris [12:52:47 [EMAIL PROTECTED]:~]$ ls -l bar -rw-r--r-- 1 jax other 4 Nov 10 12:47 bar [12:52:51 [EMAIL PROTECTED]:~]$ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]