Installing HYLAFAX v4.0pl2 on SunOS 4.1.x

Click here to see the maintained original for this document.


  1. Kernel patches and required tools
  2. Getting the binary distribution
  3. Installing the binary distribution
  4. Configuration of HylaFAX for SunOS
  5. UUCP and HylaFAX
  6. Login and PPP Service
  7. How to start up the fax daemons
  8. Online HTML documentation
  9. Quickly test your installation

KERNEL PATCHES AND REQUIRED TOOLS FOR SUNOS 4.1.x

The binary distribution of HylaFAX v4.0pl2 is available in gzipped tar format and was compiled under SunOS 4.1.4 with GNU gcc version 2.7.2.2 and libg++ 2.7.2. The package contains a complete set of server and clients together with some goodies to ensure a complete and ready to use system.

Previous versions of Hylafax worked on the following SunOS systems and HylaFAX v4.0pl2 should work on them as well:

If you are using a SunOS earlier than SunOS 4.1.4, you will also need the jumbo tty patch to provide hardware flow control and prevent certain problems with the serial lines getting so wedged that the machine must be rebooted to clear them. These patches do require recompiling your kernel: if they are not installed and you are not comfortable doing this, you should definitely rethink whether you have the expertise to run a fax server. They are, fortunately, quite easy to install and are known to improve serial line performance.

These jumbo tty patches are available at:

SunOS 4.1.4 does not require any of these patches. If you are not already running this latest operating system, you should very strongly consider it for security reasons and improvements like hardware flow control.

To install and run HylaFAX v4.0pl2 you will also need the following resources on your system:

There is also some free, publicly available software necessary to run HylaFAX under SunOS. I strongly recommend installing the most recent version of these programs. They are: There are also a number of very useful contributed utilites that will make Hylafax much easier and faster to use. They include: These tools are available at ftp://ftp.sgi.com/sgi/fax/contrib, along with tools for other operating systems such as IRIX,  Linux, MacOS, Windows, Win95, and WinNT.

Ghostscript Notes

Ghostscript in particular is very useful, but requires some modest tweaking to install on for SunOS. The Aladdin 5.10 version of ghostscript has slightly more restrictive licensing, but supports more formats than the GNU 2.6.1 version, which is the minimum necessary to support Hylafax.

If you compile ghostscript under SunOS, it is important to modify the ghostscript Makefiles to use the right XINCLUDE option and the right XLIBDIRS option. This will access the right Openwindows X11 files and libraries for compilation and when any Postscript files get turned to tiffg3 by the Hylafax software using (ps2fax). This is necessary because SunOS ignores the LD_LIBRARY_PATH environment variable when running programs as root as a security precaution. You may also want to add a "-s" option to the INSTALL_PROGRAM flags to install the software stripped, to save space.

If this is unclear, simply add the following lines to cc-unix.mak and gcc-unix.mak, run tar_cat to collate it into the new makefiles, and use one of the resulting makefiles to compile the software.

INSTALL_PROGRAMS= $(INSTALL) -s -m 755   # at line 38
XINCLUDE= -I/usr/openwin/include         # at line 178
XLIBDIRS= -L/usr/openwin/lib             # at line 190
There is also a known optimizer bug with gcc-2.7.2 that is tripped when compiling ghostscript-4.0[x]. There are several solutions to this: I have not yet tested the gcc-2.8.0 for SunOS, and would welcome comments from anyone who uses it. This apparently requires patches to compile under HP-UX, and that patch is under testing and development right now. 

GETTING THE BINARY DISTRIBUTION

The binary distribution is available for free from ftp://ftp.sgi.com/sgi/fax/binary/hylafax-sunos4.1.4-v4.0pl2-tar.gz,or ftp://ftp.leo.org/pub/comp/os/unix/networking/fax/hylafax/hylafax-sunos4.1.4-v4.0pl2-tar.gz.

Some of these binaries are installed suid, and some of these suid packages are owned by root. You should therefore absolutely check the sum or the md5sum value of the package to protect yourself from Trojan Horse programs and other security problems. The correct values are:


INSTALLING THE BINARY DISTRIBUTION

If you have already installed an older binary distribution of FlexFAX or HylaFAX on your system backup your old software (e.g. with tar) and then delete the entire old distribution.

Please note that the SunOS binaries do not use the default Hylafax software and spooling directories. Because SunOS by default has a rather small /var partition, Hylafax can easily overflow it with large numbers of outgoing faxes or received, undeleted faxes. Instead, the software is installed in the /usr/local/hylafax and /usr/local/spool/hylafax directories and there are symbolic links to those directories placed in /var/spool and in /usr/local/bin. To see where the software actually wound up, look at /usr/local/spool/hylafax/etc/setup.cache on the machine where you install it.

To install the binary SunOS distribution of Hylafax run this command as root:

   prompt# gzcat hylafax-sunos4.1.4-v4.0pl2-tar.gz | tar xvpf - -C  /
If you also need to install ghostscript, use this command. It does not need to be done as root:
   prompt# gzcat gs5.10-sunos4.1.4-tar.gz | tar xvpf - -C /
This HylaFAX distribution was compiled with paramaters from this version of config.local. Several of its pathnames are compiled into applications included in this binary distribution. If any of these pathnames are unacceptable, your best options are to: If you decide to recompile Hylafax, there is a file in the source distribution called hylafax-v4.0pl2/config.site that can be edited directly. It is better to copy it to hylafax-v4.0pl2/config.local and edit that file to store these changes separately. Or you can copy and use the one I used for the binaries, included here (config.local).

Options for HylaFAX config.local files include the compiler to use, various compilation flags, whether and where to install local html pages, etc. In general, there is little reason to modify them. The configuration scripts are very good at detecting and using appropriate settings without interference. The main changes you might want are whether to install the HTML documentation, and where to put the spool and binary directories.

Some of the above parameters can also be changed after installation by editing various configuration files. See also the man page config


CONFIGURATION OF HYLAFAX FOR SUNOS

If you have access to the World Wide Web, go to the HylaFAX Home Page at http://www.vix.com/hylafax/ and read the documentation. In particular, read the information that describes how to setup a fax server. Online documentation is also available through the HylaFAX manual pages; consult the pages hylafax(1M) and hylafax(4F) for introductory information on the client applications and the server setup, respectively.

In order to run HylaFAX you must have a modem with fax support (Class 1, Class 2, or Class 2.0). This modem must be connected to your system on an RS232 serial port and you have to know to which port (typically /dev/ttya or /dev/ttyb) it is connected. (Many users have reported good success with terminal servers on different operating systems as well, although I have not tried it myself). For the modem-configuration part of the installation you should know a little bit about your modem and the AT commands to control various settings in the modem. If you are in doubt ask a modem guru or consult the documentation that comes with your modem (never buy a modem without documentation).

If you don't have either documentation or a guru handy you are on your own; try configuring the modem and if you have a problem consult the WWW documentation or ask for help on the HylaFAX mailing list (read the URL above to subscribe) . There is also a new Modems for Dummies book available from O'Reilly & Associates: look for it in your local bookstore.

You should definitely consult the FAQ of HylaFAX before asking questions that may already be answered.

It is a good idea to first check out your serial port with a terminal emulation program (such as kermit or cu) to test the modem and the connection to your serial ports. Remember that you should use the same tty names for ALL modem programs. This is in direct contradiction to the "split device" trick recommended by Sun. (See UUCP and HylaFAX.)

After the modem is properly connected to your computer and your Hylafax software installed, login as root and run faxsetup:

prompt# sh /usr/local/spool/hylafax/bin/faxsetup
When you run faxsetup, use the defaults wherever possible. The only option that you really need to answer is the area code: the defaults for the others work quite well. For safety's sake, you may want to set a maximum fax number of pages for outgoing faxes as well. Do not worry when it complains about not having vgetty and egetty: these are optional programs with the mgetty package, which have not been tested under SunOS.

When faxsetup is finished, use faxaddmodem to set up your individual modem lines. Carefully read the manual page for config to set any special parameters for your site. You can always run faxaddmodem later to revise these settings.

Warning note for SunOS installation: If the faxaddmodem script seems to hang when started, suspend it and use ps to look for fuser processes that have hung. Sometimes fuser simply hangs on serial lines under SunOS. Kill off the fuser processes, resume your faxaddmodem job, and ignore the complaints about missing fuser commands. 


UUCP AND HYLAFAX

SunOS recommends something called the split-device trick for sharing modems for dial-in and dial-out. This absolutely does not work with Hylafax, nor does it work with Sbus serial expanders or a plethora of other increasingly popular setups. Hylafax will itself handle providing getty and sharing the modem with kermit, uucp, tip, etc.: simply edit the local file /etc/uucp/Devices file to use your /dev/ttyxxx modem lines instead of the associated /dev/cuxxx devices and completely remove those /dev/cuxxx devices from your system altogether to prevent confusion. 

HOW TO START UP THE FAX DAEMONS

There are several important system related files to examine. A useful script called hylafax is provided with the binary distribution to begin the fax services. This script is not installed by the default software configuration, but is in the hylafax-v4.0pl2/etc directory of the source code. It can be used to start or stop the server daemons if you decide to do so by hand rather than configuring it in the inetd.conf file. If you wish to use this script, you should delete any old hylafax, fax, and snpp entries from the inetd.conf file and edit rc.local file to start the hylafax script at boot time.

To start the daemons by hand, simply do this as root:

prompt# sh /usr/local/spool/hylafax/etc/hylafax start
To kill off the fax daemons by hand, simply do this as root:
prompt# sh /usr/local/spool/hylafax/etc/hylafax stop

ONLINE HTML DOCUMENTATION

The best online documentation is the HylaFAX Home Page at http://www.vix.com/hylafax/. The HTML material from the source distribution is no longer provided in the binary distribution, since it is bulky and depends somewhat on the configuration of the local http daemon. It is nearly identical to that in the http://www.vix.com/hylafax/ web page, except that the special hosts has been renamed to hosts.fax, and the xferstats has been renamed to xferfaxstats. I may publish these pages for SunOS distributions in the future, or provide them on request.

If you decide to compile from source you can edit the config.local file at compilation time to install them locally. 


QUICKLY TEST YOUR INSTALLATION

To test your installation once you've configured your fax server and modem, startup the fax server as shown above, log out as root, and log in again as a "normal" user.

First run faxstat to make sure the server is running:

prompt> /usr/local/hylafax/bin/faxstat
The hfaxd daemon should respond with something like:
prompt> faxstat
HylaFAX scheduler on hostname: Running
Modem ttya (+x.xxx.xxxx): Running and idle
Modem ttyb (+x.xxx.xxxx): Running and idle
prompt>
If it doesn't respond correctly, double check that the faxq and hfaxd daemons are running, and that the contents and ownership of your Hylafax hosts file, which is in the local file /usr/local/spool/hylafax/etc/hosts, are correct. (Note that this is not your local /etc/hosts file: many people have accidentally copied or modified the main hosts file onto this configuration
file, but that is an incorrect thing to do.)

Then send a short fax (use the phone number of a local fax machine instead of +1.999.555.1212):

prompt> sendfax -n -d +1.999.555.1212  <<EOF
Hello world.
I like the binary distribution of
HylaFAX v4.0pl2
EOF
You should now see the job in the queue being processed. If it is not there or fails, try running "faxstat -v", check the logs in your local file /usr/local/spool/hylafax/logs, and re-read the documentation. If you have problems that are not answered by the documentation included with the distribution, check the Web for information, especially the HylaFAQ. A mailing list for users of this software also exists; see FAQ Question 12 to learn how to subscribe to the list. 

Latest Copy of This Page

If you have comments or suggestions for this installation, or have questions about SunOS installations, feel free to contact me at the address below.

Nico Garcia / raoul@cirl.meei.harvard.edu

Last updated $Date: Fri Dec 13 18:30:04 EST 1996.