|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
-
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
- <title>HostInfo Task</title>
- </head>
-
- <body>
-
- <h2><a name="hostinfo">HostInfo</a></h2>
-
- <h3>Description</h3>
- <p>Sets the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code>
- properties in the current project.</p>
- <p>
- The <code>NAME</code> contains the host part of the canonical name of the host.<br/>
- If the host is not found, the host will contain the name as provided to the task,
- or <code>localhost</code> if no host was provided, and no name for the local
- host was found.<br/>
- The <code>DOMAIN</code> contains the domain part of the canonical name of the host.<br/>
- If the host is not found, the domain will contain the domain as provided to the task,
- or <code>localdomain</code> if no host / domain was provided.<br/>
- The <code>ADDR4</code> contains the IPv4 address of the host with the widest meaning.<br/>
- If no IPv4 address is found and a host has been provided the address <code>0.0.0.0</code>
- is returned, when no host was provided the address <code>127.0.0.1</code> is returned.<br/>
- The <code>ADDR6</code> contains the IPv6 address of the host with the widest meaning.<br/>
- If no IPv6 address is found and a host has been provided the address <code>::</code>
- is returned, when no host was provided the address <code>::1</code> is returned.<br/>
- </p>
-
- <p>These properties can be used in the build-file, for instance, to create
- host-stamped filenames, or used to replace placeholder tags inside documents
- to indicate, for example, the host where the build was performed on.
- The best place for this task is probably in an initialization target.</p>
-
- <h3>Parameters</h3>
- <table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">prefix</td>
- <td valign="top">Prefix used for all properties set. The default is no prefix.</td>
- <td align="center" valign="top">No</td>
- </tr>
- <tr>
- <td valign="top">host</td>
- <td valign="top">
- The host to retrieve the information for, default is to retrieve
- information for the host the task is running on.
- </td>
- <td align="center" valign="top">No</td>
- </tr>
- </table>
-
- <h3>Examples</h3>
-
- <pre>
- <hostinfo/>
- </pre>
-
- <p>
- Sets the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and
- <code>ADDR6</code> for the local host, using the most "global" address
- available.</p>
- <pre>
- <hostinfo prefix="remotehost" host="www.apache.org"/>
- </pre>
- <p>
- Sets the properties <code>remotehost.NAME</code> to <code>eos</code>,
- <code>remotehost.DOMAIN</code> to <code>apache.org</code>,
- <code>remotehost.ADDR4</code> to <code>140.211.11.130</code> and
- <code>remotehost.ADDR6</code> to <code>::</code>
- for the host with the name www.apache.org (provided the canonical name and ip
- addresses do not change).
- </p>
-
- </body>
- </html>
|