source: release-kits/lirk3/bin/ant-installer/web/manual/manual/OptionalTasks/rexec.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 3.9 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<html>
18
19<head>
20<meta http-equiv="Content-Language" content="en-us">
21<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22<title>RExec Task</title>
23</head>
24
25<body>
26
27<h2><a name="rexec">RExec</a></h2>
28<h3>Description</h3>
29Task to automate a remote rexec session. Just like the Telnet task,
30it uses nested <tt>&lt;read&gt;</tt> to indicate strings to wait for, and
31<tt>&lt;write&gt;</tt> tags to specify text to send to the remote process.
32
33<p><b>Note:</b> This task depends on external libraries not included in the Ant distribution.
34See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p>
35
36<p>You can specify the commands you want to execute as nested elements
37or via the command attribute, we recommend you use the command
38attribute. If you use the command attribute, you must use the
39username and password attributes as well.</p>
40
41<h3>Parameters</h3>
42<table border="1" cellpadding="2" cellspacing="0">
43 <tr>
44 <td valign="top"><b>Attribute</b></td>
45 <td valign="top"><b>Description</b></td>
46 <td valign="top"><b>Required</b></td>
47 </tr>
48 <tr>
49 <td>userid</td>
50 <td>the login id to use on the remote server.</td>
51 <td>No</td>
52 </tr>
53 <tr>
54 <td>password</td>
55 <td>the login password to use on the remote server.</td>
56 <td>No</td>
57 </tr>
58 <tr>
59 <td>server</td>
60 <td>the address of the remote rexec server.</td>
61 <td>Yes</td>
62 </tr>
63 <tr>
64 <td>command</td>
65 <td>the command to execute on the remote server.</td>
66 <td>No</td>
67 </tr>
68 <tr>
69 <td>port</td>
70 <td>the port number of the remote rexec server. Defaults to port 512 in BSD Unix systems.</td>
71 <td>No</td>
72 </tr>
73 <tr>
74 <td>timeout</td>
75 <td>set a default timeout to wait for a response. Specified in seconds. Default is no timeout.</td>
76 <td>No</td>
77 </tr>
78</table>
79<h3><a name="nested">Nested Elements</a></h3>
80The input to send to the server, and responses to wait for, are
81described as nested elements.
82
83<h4>read</h4>
84
85<p>declare (as a text child of this element) a string to wait for.
86The element supports the timeout attribute, which overrides any
87timeout specified for the task as a whole. It also has a <tt>string</tt>
88attribute, which is an alternative to specifying the string as
89a text element.
90</p>
91<i>It is not necessary to declare a closing <code>&lt;read&gt;</code> element like for the Telnet task. The connection is not broken until the command has completed and
92the input stream (output of the command) is terminated.
93</i>
94<h4>write</h4>
95
96<p>describes the text to send to the server. The <tt>echo</tt> boolean
97attribute controls whether the string is echoed to the local log;
98this is "true" by default
99</p>
100<h3>Example</h3>
101A simple example of connecting to a server and running a command.
102
103<blockquote><pre>
104&lt;rexec userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
105</pre></blockquote>
106
107The task can be used with other ports as well:
108<blockquote><pre>
109&lt;rexec port=&quot;80&quot; userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
110</pre></blockquote>
111
112
113
114</body>
115</html>
116
Note: See TracBrowser for help on using the repository browser.