687-689.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 125 行
HTML
125 行
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:UUCP</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=39//-->
<!--PAGES=687-689//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="684-687.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="689-691.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>The preceding line deals only with file transfers requested or sent from your machine. If you want to enable requests for transfers from the remote machine, you need to add two more lines:
</P>
<!-- CODE SNIP //-->
<PRE>
remote-send /usr/lib/uucppublic
remote-request /usr/lib/uucppublic
</PRE>
<!-- END CODE SNIP //-->
<P>This forces the remote machine to request files and send them only to the <TT>/usr/lib/uucppublic</TT> directory. Again, you can offer several choices if you want, as long as they are separated by spaces.</P>
<P>Finally, UUCP allows machines to forward data through other machines, a process called <I>hopping</I>. In other words, if you want to send mail to the system <TT>warlock</TT> but can only get there through the system <TT>wizard</TT>, you have to instruct UUCP that your local system can get to <TT>warlock</TT> through <TT>wizard</TT>. You add a forward command to the <TT>/usr/lib/uucp/sys</TT> file:</P>
<!-- CODE SNIP //-->
<PRE>
system wizard
…
forward warlock
</PRE>
<!-- END CODE SNIP //-->
<P>You should then add an entry for the <TT>warlock</TT> system that tells UUCP that any mail for you will be coming back through <TT>wizard</TT>. The matching entry is</P>
<!-- CODE SNIP //-->
<PRE>
system warlock
…
forward-to merlin
</PRE>
<!-- END CODE SNIP //-->
<P>The <TT>forward-to</TT> entry is necessary so that any files returned by <TT>warlock</TT> are passed to <TT>merlin</TT>, the local host machine. Otherwise, they are discarded by UUCP as not being routable.</P>
<P>By default, Taylor UUCP does not allow forwarding, so system administrators should think carefully about allowing it because the potential for abuse is high.</P>
<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">HDB UUCP Configuration</FONT></H4>
<P>HDB UUCP is a more recent version of UUCP and its configuration files are different. In many ways, the HDB configuration is easier than Taylor UUCP’s, although neither is difficult once you know the basic process.
</P>
<P>The name of the local system is not set in the UUCP configuration files but by the Linux hostname itself. To set the system name use the <TT>hostname</TT> command.</P>
<P>The names of the remote systems are stored in the file <TT>/usr/lib/uucp/Systems</TT> (some older versions used the name <TT>/usr/lib/uucp/L.sys</TT>). There is a single line for each remote system that you will be connected to. The format of each line is as follows:</P>
<!-- CODE SNIP //-->
<PRE>
sitename schedule device_type speed phone login_script
</PRE>
<!-- END CODE SNIP //-->
<P><I>sitename</I> is the name of the remote machine, <I>schedule</I> is when it can be connected, <I>device_type</I> is the type of device to use to call the remote system, <I>speed</I> is the speed (or range of speeds) that can be used to connect, <I>phone</I> is the telephone number, and <I>login_script</I> is the script used when a connection is made (such as the <TT>chat</TT> script in Taylor UUCP). For example, to call the remote system <TT>arthur</TT>, the <TT>/usr/lib/uucp/Systems</TT> file will have a line like this:</P>
<!-- CODE SNIP //-->
<PRE>
arthur Any ACU 9600 555-1212 login: uucp password: secret1
</PRE>
<!-- END CODE SNIP //-->
<P>The <TT>Any</TT> entry in the schedule field tells UUCP that it can call at any time. The <TT>ACU</TT> entry in the device field tells UUCP to use the ACU (automatic calling unit) defined in the <TT>/usr/lib/uucp/Devices</TT> file.</P>
<P>The <TT>/usr/lib/uucp/Devices</TT> file (or <TT>/usr/lib/uucp/L-devices</TT> file in some older versions) contains information about the devices that can be used to call the remote systems. The Devices file follows this syntax:</P>
<!-- CODE SNIP //-->
<PRE>
devicetype ttyline dialerline speed dialer [token Dialer …]
</PRE>
<!-- END CODE SNIP //-->
<P><I>devicetype</I> is the name of the device (which should match the device name in the <TT>/usr/lib/uucp/Systems</TT> file), <I>ttyline</I> is the device driver to be used for the connecting port (usually a serial line, such as <TT>/dev/tty2a</TT> or <TT>/dev/modem</TT>), <I>dialerline</I> is an obsolete field left as a hyphen, <I>speed</I> is the speed range of the device, and <I>dialer</I> is the name of the file that tells UUCP how to use the device. A sample line for a Hayes 9600 baud modem used to connect on the second serial port of the system might have an entry in the <TT>/usr/lib/uucp/Devices</TT> file such as</P>
<!-- CODE SNIP //-->
<PRE>
ACU tty2A - 9600 dialHA96
</PRE>
<!-- END CODE SNIP //-->
<P>This identifies the <TT>ACU</TT> entry as a 9600 baud connection through <TT>/dev/tty2A</TT> (the <TT>/dev</TT> portion of the name is not needed with HDB UUCP), and it uses a program called <TT>dialHA96</TT> to handle the setup and dialing of the modem. There are usually programs available for most popular modems that set the modem configuration parameters automatically, leaving Linux out of that process.</P>
<P>If a modem program is not available to handle the modem, an entry in the file <TT>/usr/lib/uucp/Dialers</TT> can be used. The format of the Dialers entries is</P>
<!-- CODE SNIP //-->
<PRE>
dialer translation expect send …
</PRE>
<!-- END CODE SNIP //-->
<P><I>dialer</I> is the name of the dialer (matching the Devices file), <I>translation</I> is the translation table to use for the phone number (converting characters when necessary to pauses, beeps, and so on), and the <I>expect</I> and <I>send</I> entries are the <TT>chat</TT> script to set up the modem. White space in the script is ignored unless it is in quotation marks. A sample line in the Dialers file looks like this:</P>
<!-- CODE SNIP //-->
<PRE>
hayes1200 =,-, “” AT\r\c OK\r \EATDT\T\r\c CONNECT
</PRE>
<!-- END CODE SNIP //-->
<P>This is the entry for a Hayes 1200 Smartmodem, identified by the name <TT>hayes1200</TT>, with translations for the <TT>=</TT> and <TT>-</TT> characters, followed by the <TT>AT</TT> commands used to set up the modem. Because these entries are usually supplied in the Dialers file for most popular modems, we won’t bother going into detail about them.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="684-687.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="689-691.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?