📄 ch64.htm
字号:
<P>After the installation is done, check <TT>/usr/local/bin/fax</TT> for executable
files. At a minimum, you should have <TT>faxcover</TT>, <TT>faxd</TT>, and <TT>sendfax</TT>
in this directory.</P>
<P>Once you have HylaFAX installed, you can add modems with the <TT>faxaddmodem</TT>
shell script. This script is interactive and steps you through the configuration
and installation of a new or existing modem.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading10<FONT COLOR="#000077"><B>TIP: </B></FONT>Even if you have
a previous version of this software installed, run the <TT>faxaddmodem</TT> script
to update the configuration information for your modems. Running <TT>faxaddmodem</TT>
twice will not ruin anything.
<HR>
</DL>
<DL>
<DD>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading11<FONT COLOR="#000077"><B>TIP:</B> </FONT>If your modem is
configured to communicate to the host at a fixed baud rate, use the <TT>-s</TT> option
with <TT>faxaddmodem</TT>. See the <TT>faxaddmodem</TT> manual page for details.
<HR>
</DL>
<P>A sample configuration session for my machine is shown in Listing 64.2. Note that
I ran as <TT>root</TT> while I did this. I pressed the Enter key after each <TT>[yes]</TT>
command to accept the default responses. If you do not like what you see, type <TT>n</TT>
and then press Enter.
<H3 ALIGN="CENTER"><A NAME="Heading12<FONT COLOR="#000077">Listing 64.2. Sample
configuration for HylaFAX.</FONT><FONT COLOR="#0066FF"></FONT></H3>
<PRE><FONT COLOR="#0066FF"># faxaddmodem
Verifying your system is set up properly for fax service...
There is no entry for the fax user in the password file.
The fax software needs a name to work properly; add it [yes]?
Added user "fax" to /etc/passwd.
Added fax user to "/etc/passwd.sgi".
There does not appear to be an entry for the fax service in
either the yellow pages database or the /etc/services file;
should an entry be added to /etc/services [yes]?
There is no entry for the fax service in "/usr/etc/inetd.conf";
should one be added [yes]?
Poking inetd so that it rereads the configuration file.
There does not appear to be an entry for the FaxMaster in
either the yellow pages database or the /usr/lib/aliases file;
should an entry be added to /usr/lib/aliases [yes]?
Users to receive fax-related mail [root]?
Rebuilding /usr/lib/aliases database.
41 aliases, longest 81 bytes, 823 bytes total
Done verifying system setup.
Serial port that modem is connected to []? cua1
Ok, time to set up a configuration file for the modem. The manual
page config(4F) may be useful during this process. Also be aware
that at any time you can safely interrupt this procedure.
No existing configuration. Let's do this from scratch.
Phone number of fax modem []? +1.713.265.1539
This is the phone number associated with the modem being configured.
It is passed as an "identity" to peer fax machines and it may
also appear on tag lines created by the fax server.
The phone number should be a complete international dialing specification
in the form +&ltcountry code&gt; &ltarea code&gt; &ltlocal part&gt;.
Any other characters included for readability are automatically
removed if they might cause problems.
Area code []? 713
Country code [1]?
Long distance dialing prefix [1]?
International dialing prefix [011]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received fax [0600]?
Rings to wait before answering [1]?
Modem speaker volume [off]?
The server configuration parameters are
FAXNumber: +1.713.265.1539
AreaCode 713
CountryCode 1
LongDistancePrefix: 1
InternationalPrefix: 011
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: off
Are these ok [yes]? n
Phone number of fax modem [+1.713.265.1539]?
Area code [713]?
Country code [1]?
Long distance dialing prefix [1]?
International dialing prefix [011]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received fax [0600]?
Rings to wait before answering [1]?
Modem speaker volume [off]? low
The server configuration parameters are
FAXNumber: +1.713.265.1539
AreaCode 713
CountryCode 1
LongDistancePrefix: 1
InternationalPrefix: 011
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: low
Are these ok [yes]?
Now we are going to probe the tty port to figure out the type
of modem that is attached. This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).
Hmm, this looks like a Class 1 modem.
Product code is "1444".
Modem manufacturer is "USRobotics".
Modem model is "Courier".
Using prototype configuration file config.usr-courier...
The modem configuration parameters are:
ModemRate: 19200
ModemFlowControl: xonxoff
ModemFlowControlCmd: &H2
ModemSetupDTRCmd: S13=1&D2
ModemSetupDCDCmd: &C1
ModemDialCmd: DT%s@
ModemResultCodesCmd X4
Are these ok [yes]?
Startup a fax server for this modem [yes]
/usr/etc/faxd -m /dev/cua1
#
</FONT></PRE>
<P>HylaFAX requires that a fax user exist in the password file on the server machine.
This user should have the same user ID as <TT>uucp</TT> so that lock files can be
easily shared.</P>
<P>Client applications communicate with the server machine via the <TT>faxd.recv</TT>
program. This program is designed to be started by the <TT>inetd</TT> program. If
the appropriate entry is not present in <TT>inetd</TT>'s configuration file, confirming
this prompt causes it to be added. Note that there must also be a fax service already
set up for this step to succeed (see above).</P>
<P>A fax server entry must exist so that the <TT>inetd</TT> program can set up the
fax job submission server, <TT>faxd.recv</TT>, on the appropriate port. If the server
machine is running NIS (formerly known as Yellow Pages), it may be necessary to create
the entry in the appropriate map. Otherwise, the entry is installed in the <TT>/etc/services</TT>
file.</P>
<P>The fax server sends mail notices to a well-known user called the <TT>FaxMaster</TT>
when certain events occur. Some examples are when faxes are received or when modems
appear to be on the blink. This step sets up a mail alias for the <TT>FaxMaster</TT>.
The alias lists those system administrators that handle HylaFAX-specific problems.
I chose <TT>root</TT> because I have a small system and I usually wind up doing all
my administrative stuff as root anyway. If you have a large user base, perhaps a
specific user could handle all the fax-related problems.</P>
<P>This completes the collection of server-related parameters. The remaining steps
identify and configure the modem. Note that if you do not specify a fixed rate for
modem communications, <TT>faxaddmodem</TT> will probe for a good speed. The <TT>faxaddmodem</TT>
command is good at finding what type of modem you have and configuring it. Unless
you have a compelling reason to change the responses to settings other than the defaults,
leave them.</P>
<P>The fax daemon is now started for you. This is done with <TT>/usr/etc/faxd -m
/dev/cua1</TT>. You may want to put this command in your <TT>/etc/rc.d</TT> file
for subsequent boots so that you don't have to remember to start it yourself.
<H3 ALIGN="CENTER"><A NAME="Heading13<FONT COLOR="#000077">Troubleshooting</FONT></H3>
<P>You are bound to run into difficulties while installing HylaFAX. Despite my assertions
in the last section about two simple steps to complete the installation, you still
have the potential of running into problems. Here is a brief list of problems and
their solutions. The list is by no means complete, nor is it guaranteed the examples
will apply to you, but at least it will give you an idea of what could be wrong.
<UL>
<LI>You need the <TT>afm-tar.Z</TT> file for the Adobe Font Metric (AFM) fonts required
by the <TT>sendfax</TT> program. You can get this file via FTP from <TT>sgi.com</TT>.
Some HylaFAX distributions do not include these Metric files. A subset of these fonts
is available via FTP from <TT>sgi.com</TT> in the file <TT>/sgi/fax/afm-tar.Z</TT>.
If you do not install the AFM files, you get error messages about <TT>fonts not found</TT>.
<P>
<LI>Add a user called <TT>fax</TT> to the same group as <TT>uucp</TT>. The <TT>faxaddmodem</TT>
call may not work and bomb with errors about <TT>too many arguments</TT>. If this
happens, make sure your modem works. If you cannot use <TT>cu</TT> on your modem,
fix that problem first. Check the cables, initialization strings, and so on. For
external modems, check to see whether the cable has the relevant signals for doing
hardware flow control if necessary and that it passes the DCD and DTR signals appropriately.
<P>
<LI>If you have a Class 1 modem, you cannot use hardware flow control. Class 2 modems
do support hardware control. Ensure that you have the correct cables for the type
of external modem you plan to connect to.
</UL>
<H3 ALIGN="CENTER"><A NAME="Heading14<FONT COLOR="#000077">Setting Up a Send
and Receive Daemon</FONT></H3>
<P>The <TT>faxd</TT> daemon is the main processing agent of the HylaFAX package.
You need one <TT>faxd</TT> process and FIFO for each fax modem on your system. <TT>faxd</TT>
listens to its own FIFO for all its command directives. When you start <TT>faxd</TT>,
you can use the following options:
<UL>
<LI><TT>-m</TT> to specify the terminal device the fax modem is attached to. For
example, <TT>/dev/cua1</TT> is a mandatory argument to <TT>faxd</TT>.
<P>
<LI><TT>-q</TT> to specify a spooling area in which to operate other than <TT>/var/spool/HylaFAX</TT>.
<P>
<LI><TT>-i</TT> to specify the interval in seconds that a job should be held between
transmission attempts. By default, this interval is 900 seconds.
<P>
<LI><TT>-g</TT> to indicate that <TT>faxd</TT> should act like the <TT>getty</TT>
program if it receives a call from a data modem. See the <TT>getty</TT> man page
for details. If this option is not specified and the server is not configured to
support incoming data connections, incoming data connections will be rejected.
<P>
<LI><TT>-d</TT> to stop <TT>faxd</TT> from detaching itself from the terminal. This
is useful for debugging.
<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -