This linked binary distribution is for Hylafax 3.0pl1 for SunOS 4.1.x. It was compiled, statically linked so no additional libraries are required, on a SunOS 4.1.4 system with gcc-2.7.0 with the collect2.c patch, libg++-2.7.0a, and gawk-2.15.6. The new patch for hylafax-v3.0pl0 is needed to compile under gcc-2.7.0, I suggest installing that immediately for your source code. It basically fixes inconsistencies with the older ANSI standards: gcc keeps more up to date than anybody else, I believe, which is why the older ANSI failed *first* on gcc. Please report problems with this distribution to Nico Garcia, raoul@mit.edu. Many other people developed the patches to get this going on SunOS systems: they're mentioned in the html pages. I no longer include them, they're too *big* for a binaries only distribution. There are some legal copyright issues involved with ghostscript and gawk, so I have not included them in this package. They're also bulky and may already be on your system. If not, they're available with the hylafax binaries at sgi.com:/sgi/fax/binary. Both are required for hylafax to function correctly, ghostscript to transform Postscript to fax documents and back, and gawk to properly process strings in the various shell scripts. The checksums for the binaries are: 48980 636 faxtool-sunos4.1.4-tar.gz 00129 301 gawk-sunos4.1.4-2.15.6-tar.gz 14111 2991 ghostscript-sunos4.1.4-3.33-tar.gz 57048 2887 hylafax-sunos4.1.4-v3.0pl1-tar.gz The jumbo tty patches are available from sunsolve1.sun.com:/pub/patches via anonymous ftp, or ftp:/sunsolve1.sun.com/pub/patches/patches.html for web access. 100513-04.tar.Z is the 4.1.[123] jumbo tty patch 101621-02.tar.Z is the 4.1.3_U1 jumbo tty patch Based on my experience, no tty patch is needed for SunOS 4.1.4, they finally included it in the distribution. *Good*. ------- 0) Read this entire document. There are things you may wish to modify or give thought to before installing them, and you will need a moderate chunk of diskspace as well. You will also need root access for the preparation work and installation. 1) Make a complete dump of your system before starting, just in case of accidents while editing your system files. Believe me, this is a very good idea. 2) Install the required GNU and freeware tools. These are gzip (a GNU compression program for unzipping the other binaries or source code), gawk (a GNU version of awk for certain shell scripts), and ghostscript (a free version of Postscript based image and print handlers). a) Gzip is available as source from aeneas.mit.edu:/pub/gnu/gzip-1.2.4.tar. b) Gawk is available as source from aeneas.mit.edu:/pub/gnu/gawk-2.15.6.tar.gz, or as binary from sgi.com:/sgi/fax/binary/gawk-sunos4.1-2.15.6.tar.gz. To install it from binary in standard locations, use the following command on the binary distribution: prompt> zcat gawk-sunos4.1-2.15.6-tar.gz | tar xvfp - -C / c) Ghostscript is available as source from ftp.cs.wisc.edu, in the ghost/aladdin or ghost/gnu directories. Note that it compiles better statically on older Sun systems, because Sun left certain function calls out of their X libraries. There is a binary of the latest aladdin version, 3.33, patched, including the fonts, at sgi.com:/sgi/fax/binary. To install it in its correct locations, use the following command on the binary distribution: prompt> zcat gs-3.33-sunos4.1-tar.gz | tar xvfp - -C / d) Faxtool and sfax are user contributed programs for setting up fax transmissions in much more user-friendly ways than the hylafax 'sendfax' command. Both of those are available as source from sgi.com:/sgi/fax/contrib, and require minor modifications to work with this distribution (mainly changing the expected location of certain files). They are available as binaries at sgi.com:/sgi/fax/binary, and can be installed with the following command: prompt> zcat faxtool-sunos4.1-tar.gz | tar xvfp - -C / Be aware, faxtool comes with some old backup files you don't need and will *not* compile with gmake: you must use /bin/make. 3) Install the hylafax binaries. This must be done by a root user, since several of the programs are suid root. It also installs a number of symbolic links in /usr/local/bin, so that the user's path need not be altered to use the common hylafax commands. Use this command: prompt> zcat hylafax-sunos4.1-v3.0pl1.tar.gz | tar xvpf - -C / There was a known problem (in my opinion) with Sun's tar, where it will *not* properly handle un-tarring pipes. GNU tar works fine, but if you were using Sun tar, you had to deal with any FIFO's by hand, or by removing the files created there and letting the fax daemons cope with creating the correct ones. I have removed them from this new distribution, but early ones had these pipes. To avoid trouble with earlier distributions, use this command after installing the hylafax binaries. This way, the faxq and faxgetty daemons can install their *own* pipes. prompt> /bin/rm -f /usr/local/spool/fax/FIFO* I've re-configured the distribution slightly to install software under /usr/local/fax and /usr/local/spool, and to send high resolution faxes by default. This is because I didn't have root access to /usr/local/bin to install the suid programs there on our network, and because /usr/spool is *much* too small to keep all the faxes on SunOS (in my opinion). To duplicate this for your own compilation, set these entries in your config.local. I used to include the html files, but they add a *lot* of bulk, and you can read those easily online from the SGI web site. DIR_BIN="/usr/local/fax/bin" # directory for client apps DIR_LIBDATA="/usr/local/fax/lib" # directory for client data DIR_LIBEXEC="/usr/local/fax/lib" # directory for libraries&hidden apps DIR_MAN="/usr/local/fax/man" # directory for manual pages DIR_SPOOL="/usr/local/spool/fax" # directory for spooling area DIR_SBIN="/usr/local/spool/fax/bin" # directory for system apps DEFVRES="196" # default vertical res for outbound fax 4) Make sure you are not using the split device trick for dial-in and dial-out. That trick involves naming two devices with the same major device number, and device numbers distinguished by adding 128 to the lower. Typical devices are /dev/ttya and a newly created dial-out device /dev/cua0. Delete /dev/cua0 so no one else mucks with it and confuses the hylafax software. Switch any software using /dev/cua0 to use /dev/ttya, typically by altering the /etc/uucp/Devices file used by uucp and tip. That involves changing lines like the first one below to the second one below: ACU ttya - 2400 zyxel2400 I have not tested uucp with these changes extensively, but it works alright for me here with this setup. This split device trick also does not work at all with Sbus-serial line expanders, while faxgetty and faxq *do*, so this is a preferable way to provide dial-in/out access. 5) Change any getty's for your modem line entry in /etc/ttytab to "faxgetty", "dialup", and "on", producing entries like this one. When turned on, this will cause a faxgetty to always be launched on the serial device even if it crashes, any time the line is tweaked. Here is a sample, for these binaries. New installations may vary. ttya "/usr/local/fax/lib/faxgetty" dialup on #faxmodem Also delete any entries for the old cua0 devices you removed in the earlier stage. Then do a "kill -HUP 1" command, to clear any getty's left on those lines. 6) Add something like this to your /etc/rc.local file to start it at boot time. Again, this is the location used in these binaries. New installations may vary. # # Start up fax-modem daemon # FAXQ=/usr/local/spool/fax/bin/faxq if [ -x $FAXQ ]; then $FAXQ & echo 'faxq started for outgoing fax' >/dev/console fi 7) Set the eeprom settings on the terminal lines correctly: these should be "ttya-rts-dtr-off=false" and "ttya-ignore-cd=false" for /dev/ttya, and can be set with the "eeprom" command. These will be registered as changed but have no effect until you reboot: don't reboot just yet. These changes may actually not be necessary, but I find better performance when power cycling the Sun with these settings. 8) Make sure your serial lines have the latest patches. Install the jumbo tty patch from Sun, 100513-4 on SunOS 4.1.[123] or 101621-2 on SunOS 4.1.3_U1. SunOS 4.1.4 apparently has hardware flow control installed: a week of use seems to be fine so far. Without the patches, won't have hardware flow control available and your modems may wedge unpredictably because of known handshaking bugs in older serial line device drivers, before 4.1.4. Don't reboot just yet. 9) If you have changed your ttytab file, your eeprom settings or added kernel patches, reboot now. Make sure it comes up cleanly. If not, start up faxq by hand. 10) Do local system configurations. There are a number of modifications in this binary you may not desire. a) All the software is installed under the /usr/local/spool and /usr/local/fax directories, for separation from other system software and to get the fax spool off the miniscule /var/spool directory, which tends to overflow the / partition with old faxes, mail, print jobs, and tmp files. The only way around this is to re-compile with different settings in the config.local or config.site file in the source code. The latest versions compile pretty effortlessly, so it's quite reasonable to install your own. b) Make sure that your GettyArgs value is the Sun value of "std.%s -", not the SGI values. That would confuse incoming data calls no end, and is also in /usr/local/fax/spool/config/skel, but unlike the other options is already re-set in these binaries to the correct value. c) You may want to modify your dialrules to manipulate local phone numbers. Always test any modifications with the "dialtest" command to make sure it does what you want, and see the manpage to use this utility. For example, if you want to add a '9' in front of outside phone numbers, and not change extension numbers of 4 digits or less, add this entry at line 46, just before the line with the closing bracket. An example is at /usr/local/spool/fax/etc/dialrules.ext. [0-9][0-9][0-9][0-9][0-9]+$ = 9,& ! add 9 for outside calls d) Permissions in the hosts file are set very fascist, permitting only people on the localhost to send fax jobs. You may want to expand that a *lot* to provide broad fax access, as described in the man page on hosts. e) You may want to modify the permission for logs and received files to be more open than mode 600, so people can read the logs and get copies of the faxes without being uucp or root. Feel free to modify these in /usr/local/fax/spool/config/skel. f) You may want to modify the default phone numbers to match your area code and fax number. That is also in /usr/local/spool/fax/config/skel, and the area code should match that of the fax number. g) Last, feel free to modify your faxcover.ps and cover.templ page to work for you. I find the originals to be very confusing with the SGI symbol on them, when I neglected to use my own I kept getting responses to Nico Garcia at SGI. They are in /usr/local/fax/lib/faxcover.ps and /usr/local/spool/fax/etc/cover.templ 9) Make sure local copies of commonly used files are available. A copy of the afm files are now included with the source, but you should already have the Sun ones in /usr/openwin/lib/fonts/afm. If you don't for some reason, get them from Sam's source at sgi.com:/sgi/fax/source/hylafax-v3.0pl1-tar.gz. Sam now also includes a copy of the popular lucida font file in etc/lutRS18.pcf as well for tag files. Feel free to use your own fonts, easily selectable when configuring the modem lines, or get a copy of lutRS18.pcf from X11R6, now available from ftp.x.org:/pub/R6. If you delete this, the software will still run, but you won't get the tag lines that put page number and the caller's phone number on the fax, very useful for sorting out your faxes. 10) Connect up your fax-modems on /dev/ttya or your other lines, turn them on, and as root run "faxaddmodem" on each of them. This should create a configuration file for each, with modem types and all the configuration registers set correctly. Check your settings carefully, as you may wish to alter things. a) Faxaddmodem occasionally hangs when starting up, because the "fuser -k $DEVS" hangs instead of returning. If this happens, suspend faxaddmodem, and "kill -9" the fuser process manually. This should permit faxaddmodem to continue, although it will complain about the lack of an fuser command. Ignore that, and continue with the faxaddmodem script. b) Faxaddmodem may also complain about your DTE speed being different than the maximum speed used to connect to the modem, typically when a modem's settings say to use 19200 and the faxaddmodem script can talk to it at 38400. It will also make a few complaints about failing to contact the modem momentarily at certain steps. Unless it hangs indefinitely, or fails to finish, ignore these. 11) As root, start up "/usr/local/spool/fax/bin/faxq" to begin your fax service, unless it got started the last time you re-booted. Always restart this whenever it gets killed off by hand or by system crash. 13) Using faxtool and sfax, send a test fax to and from your most popular fax targets. In particular, watch out for scrunched pages, failed calls, failure to hang up, numberous redials, and other problems mentioned in the hylafax docs. 14) Decide how long you want to keep your old faxes, and add faxcron to your cron-based system operations. Edit it accordingly: a good place to run it from is the root crontab entries, about once a week. Your installation is now done. Zounds! If there is a bug or configuration file fix that is needed for your SunOS setup, post it to the list and send a copy to me, and I'll slip it into the next SunOS binaries. Sam has been excellent about integrating patches into his releases, but I'm willing to do that a bit earlier for the Sun stuff so the next person with the same modem or problem doesn't get bitten, and so *my* installation works better. It's not a race: Sam has to try things out and make sure they work for a *lot* more systems than just SunOS. In fact, I've written a proposed patch to set GettyArgs at configuration time, but Sam and I disagree on whether and how to do that (he thinks it's a major security hole, I think it's a helpful feature). The patch also slightly alters the Makefile generation for the port directory, so that scripts there get cleaned out when doing a "make distclean". There is an important and subtle difference between these binaries and those you might compile from scratch on a similar system. These binaries are statically linked from a newer OS, SunOS 4.1.4, for use without error messages across a broad range of SunOS systems (I added "-static" to the LDOPTS in the defs file at compilation time). For better local performance, and smaller binaries, I would suggest installing your own. The entire package is much easier and smaller to install now that stripping is an automatic step of the installation procedure (thanks, Sam!) Nico Garcia raoul@athena.mit.edu