source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/OptionalTasks/rexec.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 2.9 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>RExec Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="rexec">RExec</a></h2>
12<h3>Description</h3>
13Task to automate a remote rexec session. Just like the Telnet task,
14it uses nested <tt>&lt;read&gt;</tt> to indicate strings to wait for, and
15<tt>&lt;write&gt;</tt> tags to specify text to send to the remote process.
16
17<p><b>Note:</b> This task depends on external libraries not included in the Ant distribution.
18See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p>
19
20<h3>Parameters</h3>
21<table border="1" cellpadding="2" cellspacing="0">
22 <tr>
23 <th>Attribute</th>
24 <th>Values</th>
25 <th>Required</th>
26 </tr>
27 <tr>
28 <td>userid</td>
29 <td>the login id to use on the remote server.</td>
30 <td>Yes</td>
31 </tr>
32 <tr>
33 <td>password</td>
34 <td>the login password to use on the remote server.</td>
35 <td>Yes</td>
36 </tr>
37 <tr>
38 <td>server</td>
39 <td>the address of the remote rexec server.</td>
40 <td>Yes</td>
41 </tr>
42 <tr>
43 <td>command</td>
44 <td>the command to execute on the remote server.</td>
45 <td>Yes</td>
46 </tr>
47 <tr>
48 <td>port</td>
49 <td>the port number of the remote rexec server. Defaults to port 512 in BSD Unix systems.</td>
50 <td>No</td>
51 </tr>
52 <tr>
53 <td>timeout</td>
54 <td>set a default timeout to wait for a response. Specified in seconds. Default is no timeout.</td>
55 <td>No</td>
56 </tr>
57</table>
58<h3><a name="nested">Nested Elements</a></h3>
59The input to send to the server, and responses to wait for, are
60described as nested elements.
61
62<h4>read</h4>
63
64<p>declare (as a text child of this element) a string to wait for.
65The element supports the timeout attribute, which overrides any
66timeout specified for the task as a whole. It also has a <tt>string</tt>
67attribute, which is an alternative to specifying the string as
68a text element.
69</p>
70<i>It is not necessary to declare a closing &lt;read&gt; element like for the Telnet task. The connection is not broken until the command has completed and
71the input stream (output of the command) is terminated.
72</i>
73<h4>write</h4>
74
75<p>describes the text to send to the server. The <tt>echo</tt> boolean
76attribute controls whether the string is echoed to the local log;
77this is "true" by default
78</p>
79<h3>Example</h3>
80A simple example of connecting to a server and running a command.
81
82<blockquote><pre>
83&lt;rexec userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
84</pre></blockquote>
85
86The task can be used with other ports as well:
87<blockquote><pre>
88&lt;rexec port=&quot;80&quot; userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
89</pre></blockquote>
90
91<hr>
92<p align="center">Copyright &copy; 2003-2004 The Apache Software Foundation. All rights
93Reserved.</p>
94
95</body>
96</html>
97
Note: See TracBrowser for help on using the repository browser.