]> git.pld-linux.org Git - packages/efax.git/blob - efax.patch
- spec adapterized.
[packages/efax.git] / efax.patch
1 diff -Nur efax-0.9.orig/Makefile efax-0.9/Makefile
2 --- efax-0.9.orig/Makefile      Tue Apr 13 10:10:52 1999
3 +++ efax-0.9/Makefile   Tue Apr 13 10:11:01 1999
4 @@ -9,7 +9,7 @@
5  # is undefined
6  
7  CFLAGS=
8 -LDFLAGS=
9 +LDFLAGS=-s
10  
11  # Change the following to the destination directories for
12  # binaries and man pages. Probably /usr/bin and /usr/man on
13 diff -Nur efax-0.9.orig/efax.conf efax-0.9/efax.conf
14 --- efax-0.9.orig/efax.conf     Thu Jan  1 01:00:00 1970
15 +++ efax-0.9/efax.conf  Tue Apr 13 10:18:50 1999
16 @@ -0,0 +1,401 @@
17 +# --- Start of user configuration section --- 
18 +# 
19 +# Notes: 
20 +#
21 +#  - do not put spaces before or after the equal (=) signs.
22 +#
23 +#  - variables can also be set on the command line, for example:
24 +#       fax DEV=cua0 send file.ps
25 +#    or in a configuration file (see CONFIGFILES below)
26 +#
27 +
28 +# The names of the fax script, efax and efix, including full path
29 +# if necessary.
30 +
31 +FAX=/usr/bin/fax
32 +EFAX=/usr/bin/efax
33 +EFIX=/usr/bin/efix
34 +
35 +# The device to which the fax modem is connected (e.g. ttya for
36 +# /dev/ttya).  Use a dial-out (cua) device if available.  If
37 +# there are links to this device then all programs must use same
38 +# name or the UUCP locking mechanism will fail.  For example, if
39 +# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
40 +# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
41 +
42 +DEV=modem
43 +
44 +# Your fax number in international format, 20 characters maximum.
45 +# Use only digits, spaces, and the "+" character.
46 +
47 +FROM="+0 000 000 0000"
48 +
49 +# Your name as it should appear on the page header.
50 +
51 +NAME="from PLD system"
52 +
53 +# The preferred page size for creating and printing faxes.
54 +# Allowed values are "letter", "legal", and "a4".
55 +
56 +# PAGE=letter
57 +# PAGE=legal
58 +PAGE=a4
59 +
60 +# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
61 +# Postscript.  See definition of PRINT (below) for more options.
62 +
63 +PRTYPE=ps                              # Postscript (e.g. Apple LaserWriter)
64 +# PRTYPE=pcl                           # HP-PCL (e.g. HP LaserJet) 
65 +
66 +# The command to print image files from standard input.  Typically
67 +# this is "lpr" or "lp".
68 +
69 +PRCMD="lpr"
70 +
71 +# The command to view a Portable Gray Map (PGM) image from the
72 +# standard input.  Typically "xv -" or "xloadimage stdin".
73 +
74 +VIEWCMD="xloadimage stdin"             # best
75 +# VIEWCMD="pnmtoxwd | xwud"            # slower alternative
76 +# VIEWCMD="xv -"                       # much slower alternative       
77 +
78 +# The name of the Ghostscript executable including full path if
79 +# necessary.  Only required if faxing Postscript files.
80 +
81 +GS=/usr/bin/gs
82 +
83 +# Dial string prefix and suffix such as T for tone dialing, P for
84 +# pulse dialing, 9 to get an external line, commas for delays or
85 +# W to wait for dial tone.  See definition of TELCVT below if you
86 +# have more complex requirements.
87 +
88 +DIALPREFIX="T"
89 +DIALSUFFIX=""
90 +
91 +# The name(s) of lock file(s) according to your system's
92 +# conventions. Protect with single quotes for delayed evaluation.
93 +# Add a leading '#' to the file name to use binary format.
94 +
95 +LOCK='-x /var/lock/LCK..$DEV'                  # modern systems
96 +# LOCK='-x /usr/spool/uucp/LCK..$DEV'          # older systems
97 +# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
98 +# LOCK='-x #/usr/spool/uucp/LCK..$DEV'         # binary format
99 +# LOCK='-x /usr/spool/locks/LK.047.040.011'    # SysV style names
100 +# LOCK=''                                      # no lock file
101 +
102 +# Uncomment one of the following lines to force xon/xoff flow
103 +# control only if you have one of the types of modems listed.
104 +
105 +# FCINIT='-j\Q4'               # AT&T (Dataport, Paradyne)
106 +# FCINIT='-j\Q1'               # Motorola (Power Modem, 3400 Pro,...)
107 +# FCINIT='-j*F1'               # QuickComm (Spirit II)
108 +# FCINIT='-j&H2'               # USR (Courier, Sportster)
109 +# FCINIT='-or'                 # Multi-Tech (for bit reversal)
110 +
111 +# ****************************************************************
112 +# The remaining options probably won't need to be changed.
113 +# ****************************************************************
114 +
115 +# Configuration files that are sourced if they exist.  Comment
116 +# out if you don't need to use config files. Warning: any type of
117 +# shell command in these files will be executed.
118 +
119 +CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
120 +
121 +# A command that will generate unique names for logs and received
122 +# files.  'date +%m%d%H%M%S' works on most systems.  Protect with
123 +# single quotes.
124 +
125 +TSTAMP='date +%m%d%H%M%S'
126 +# TSTAMP='echo $$'             # alternative - use process number
127 +
128 +# Shell command to convert aliases to phone numbers when sending
129 +# faxes.  When executed $1 will be the alias and $f the file name
130 +# to search.  The example below uses a directory file where alias
131 +# lines start with the keyword "fax" followed by the alias in
132 +# parentheses and a colon.  The remainder of the line is taken to
133 +# be the phone number. Other lines are ignored.  For example, if
134 +# one of the files in DIRFILES (defined below) contained the line
135 +# "fax(kpmg): 691-3031", you could use the command "fax send kpmg
136 +# invoice.24". Protect with single quotes.
137 +
138 +LOOKUP='eval sed -n -e "/^fax($1):/{" -e "s/^[^:]*://p" -eq -e"}" $f'
139 +
140 +# List of telephone directory file(s) to be searched.  The
141 +# default is the file .faxdir in the user's home directory.
142 +
143 +DIRFILES="${HOME:-.}/.faxdir"
144 +
145 +# Shell command to convert phone numbers to dial strings.  This
146 +# lets you to store numbers without the long distance or
147 +# alternate carrier access codes, passwords, accounting digits,
148 +# etc.  In the examples below this is used to convert numbers
149 +# beginning with '+'; the first substitution handles same-country
150 +# calls and the second handles international calls.
151 +
152 +TELCVT='sed -e s/+48/0/ -e s/+/00/'    # Polish
153 +# TELCVT='sed -e s/+1/1/ -e s/+/011/'  # North America
154 +# TELCVT='sed -e s/+61/0/ -e s/+/0011/' # Australia
155 +# TELCVT='sed -e s/+44/0/ -e s/+/00/'  # UK
156 +# TELCVT='sed -e s/+49/0/ -e s/+/00/'  # Germany
157 +# TELCVT='sed -e s/+852// -e s/+/001/' # Hong Kong
158 +# TELCVT='sed -e s/+33// -e s/+/19W/'  # France (?)
159 +# TELCVT='sed -e s/+34/0/ -e s/+/07W/' # Spain
160 +# TELCVT='sed -e s/+1/10288/'          # use AT&T
161 +# TELCVT='sed -e s/+/T82W1682W9W/'     # get out of PBX
162 +
163 +# efix options to use a bitmap font for text-to-fax conversion.
164 +# The option -l66 puts 66 lines of text per page, -d1,1 sets 1
165 +# inch top & left margin.  Comment these out to use the built-in
166 +# font. Use "fax makefont" to make bitmap fonts from Postscript
167 +# fonts.
168 +
169 +# TEXTFONT="-l66 -d1,1 -f /usr/bin/efaxfont"
170 +
171 +# efax options to specify a different font for headers. Generate
172 +# using "fax makefont."
173 +
174 +# HDRFONT="-f /usr/bin/efaxfont"
175 +
176 +# Dimensions of page sizes.
177 +
178 +PAGE_letter="8.465x11in"       # fax width x letter length
179 +PAGE_legal="8.465x14in"                # fax width x legal length
180 +PAGE_a4="21x29.7cm"            # ISO A4
181 +
182 +# Default resolution for converting to fax format. Can only be
183 +# 204x196 or 204x98.
184 +
185 +RES=204x196                    # default "Fine" resolution (196 lpi)
186 +# RES=204x98                   # standard resolution (98 lpi)
187 +
188 +# When the print and view commands below are executed, $f will be
189 +# the input file name and $PAGEDIM will be one of the above page
190 +# dimensions. Protect with single quotes.
191 +
192 +# PRINT: A command to convert fax files to a printable format.
193 +# For printers other than Postscript or PCL you can use efix's
194 +# PBM output and an appropriate pbm filter (such as pbmtoepson)
195 +# or efix's Postsript output and Ghostscript as a filter. Change
196 +# the scaling (-s) and displacement (-d) options as required to
197 +# fit the image onto the area your printer can print.
198 +
199 +PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f'
200 +
201 +# example using pbm utilities:
202 +# PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson'
203 +
204 +# example using Ghostscript:
205 +# PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \
206 +#      $GS -q  -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \
207 +#      -dNOPAUSE -dSAFER -sOutputFile=- - '
208 +
209 +# VIEW: A command to convert fax files to PGM format for
210 +# previewing.  efix's pgm output reduces image dimensions by 4X.
211 +
212 +# VIEW='$EFIX -ve -p$PAGEDIM -r200 -opgm $f'   # 50dpi: fast, whole-page view
213 +VIEW='$EFIX -ve -p$PAGEDIM -r300 -opgm $f'     # 75dpi: slower, readable size
214 +
215 +# Commands to set up modem.  "-iZ -i&FE&D2S7=120 -i&C0"
216 +# works with almost all modems.  See the efax(1) man page for
217 +# details.
218 +
219 +INIT="-iZ -i&FE&D2S7=120 -i&C0"
220 +
221 +# Command(s) to reset modem when efax finishes. "-kZ" works in
222 +# almost all cases.
223 +
224 +RESET="-kZ"
225 +# RESET="-kZ -k&F+FCLASS=0"    # for modems that stay in fax mode after reset
226 +
227 +# Speaker mode(M) and loudness(L). Mn sets speaker mode where n
228 +# means: 0:never, 1:until carrier, 2:always, 3:on receive only.
229 +
230 +SPKR="-iM1L0"
231 +
232 +# Options to use a particular command sets.  Normally efax
233 +# selects the command set based on the modem's capabilities.  Use
234 +# -o1 to force Class 1, -o2 for Class 2 and -o0 for Class 2.0.
235 +
236 +# CLASSINIT="-o1"      # Class 1
237 +# CLASSINIT=""         # Class 2
238 +# CLASSINIT="-o0"      # Class 2.0
239 +
240 +# The modem's capabilities for sending faxes.  Normally efax
241 +# chooses these by querying the modem.  "-c 1,3,0,0,0,0,0,0"
242 +# forces 9600 bps maximum speed.  See the efax(1) man page for a
243 +# description of the fields.
244 +
245 +# TXCAP="-c 1,3,0,2,0,0,0,0"
246 +
247 +# Capabilities for receiving faxes.  Usually the same as TXCAP.
248 +# If your modem only receives at 4800 bps use "-c 1,1,0,0,0,0,0,0".
249 +
250 +# RXCAP="$TXCAP"
251 +
252 +# Additional options required only for transmit or only for
253 +# receive.  None normally required.
254 +
255 +RXINIT=""
256 +TXINIT=""
257 +
258 +# Command to make a date for the page header. Protect with single
259 +# quotes.  'date "+%Y/%m/%d %H:%M"' works on most systems.
260 +
261 +DATECMD='date "+%Y/%m/%d %H:%M"'       # YYYY/MM/DD HH:MM (24hour)
262 +# DATECMD='date'                       # longer, more readable
263 +
264 +# Page header format.  You may use $DATE, $NAME, $FROM, $TO, and
265 +# "%d/%d" (for page number and count).  Protect with single
266 +# quotes.  Example: '$DATE $FROM $NAME p. %d/%d'.
267 +
268 +HDR='$DATE     $FROM      $NAME     p. %d/%d'
269 +
270 +# BUSYRETRIES is a list of delays in seconds between attempts to
271 +# redial busy numbers.  Comment out if you don't want to retry
272 +# busy numbers.
273 +
274 +BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60"
275 +
276 +# FAILRETRIES is a list of delays in seconds between attempts to
277 +# retry failed transmissions.  Retries are only attempted if at
278 +# least one page was sent in the previous attempt. Retries
279 +# include only pages not already sent. Comment out if you don't
280 +# want to retry failed transmissions.
281 +
282 +FAILRETRIES="300 300"  # try two more times at 5 minute intervals
283 +
284 +# Command to run another program (efax) at a higher-than-normal
285 +# scheduling priority.  This command isn't used if it fails
286 +# (e.g. because the current user isn't privileged).  Comment this
287 +# out if it causes problems.
288 +
289 +NICE="nice -n -10"
290 +
291 +# Standard versions of commands that are often aliased.
292 +
293 +RM="/bin/rm -f"
294 +LS="/bin/ls"
295 +
296 +# Messages to display.  VERB sets the messages displayed (stderr)
297 +# and VERBLOG the messages written to log files (stdout).
298 +
299 +VERB="ewin"            # show errors, warnings, progress & negotiation
300 +VERBLOG="chewmainrxtf" # log everything
301 +
302 +# ****************************************************************
303 +# The remaining configuration options apply only to the `fax
304 +# answer' command.  You can ignore these if you will only be
305 +# running efax manually.  See "USING INIT TO RUN EFAX" in the
306 +# efax man page for more information.
307 +# ****************************************************************
308 +
309 +# device or file where fatal error messages should be written
310 +
311 +CONSOLE=/dev/console
312 +
313 +# The directory to store incoming faxes and log files.  This directory
314 +# should already exist and be writable by the user(s) of this script.
315 +
316 +FAXDIR=/var/spool/fax
317 +LOGDIR=/var/log/fax
318 +
319 +# The strftime(3) pattern that generates the file name for
320 +# received files.  For example, at 10:45:36 on February 25,
321 +# "%m%d%H%M%S" would produce 0225104536, "%j-%H%M" would produce
322 +# 056-1045, and %d%b%H%M 25Feb1045.
323 +
324 +ANSFNAME="%m%d%H%M%S"
325 +
326 +# umask for received files. Use 022 to allow anyone to retrieve faxes.
327 +
328 +UMASK=022
329 +
330 +# The user to be sent mail when a fax is received.
331 +
332 +FAXMGR=root
333 +
334 +# The sendmail executable including full path if necessary.  Only
335 +# required if forwarding received faxes by e-mail in $NOTIFY.
336 +
337 +SENDMAIL=/usr/sbin/sendmail
338 +
339 +# The command to execute when a fax is received.  Normally this
340 +# sends FAXMGR e-mail or prints the received fax.  The variable
341 +# $f will be the name of the log file, $FILES will contain the
342 +# names of the received files, and $REMID will have the remote ID
343 +# string or '?' if none. The faxmail function will e-mail the fax
344 +# as MIME image/tiff attachments.  Comment this out to do
345 +# nothing.  Protect with single quotes.
346 +
347 +NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR'
348 +# NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f'
349 +# NOTIFY='lpr $f ; $FAX print $OPT $FILES'
350 +
351 +# The number of rings to wait before answering.
352 +
353 +ANSRINGS=1
354 +
355 +# If you want to enable fax/data adaptive answer (AA) read the
356 +# efax man page and define DATAINIT to be the options that enable
357 +# AA. Note: AA does not work properly on some (2400/9600) modems
358 +# unless the modem initialization is done at 2400 bps (not
359 +# possible with efax). USR modems do not support modem adaptive
360 +# answer (+FAE=) in Class 1.  &C1 enables most modems' DCD line
361 +# so a signal can be sent to shells when a call is dropped.  You
362 +# must also define DCMD (see below).
363 +
364 +DATAOPT="-j&C1 -j+FCLASS=0 -jS7=30"
365 +# DATAINIT="$DATAOPT -j+FAE=1"         # Class 1 modem adaptive answer
366 +# DATAINIT="$DATAOPT -j+FAA=1"         # Class 2[.0] modem adaptive answer
367 +# DATAINIT="$DATAOPT -oa"              # software adaptive answer
368 +# DATAINIT="$DATAOPT"                  # data-only answer
369 +
370 +# If you have a voice modem and want to answer in voice mode
371 +# define VOICEINIT to be the options that enable voice mode.  You
372 +# must also set VCMD below. Voice support is not yet available.
373 +
374 +# VOICEINIT="-j#CLS=8"                 # Rockwell voice modems
375 +# VOICEINIT="-jM2L2#CLS=8#VLS=4"       #    with speaker on
376 +
377 +# Argument to exec(2) of "/bin/sh -c" for incoming data calls.
378 +# This command will usually exec getty(8) but can include other
379 +# commands to set up the serial port, etc.  Up to 6 %d arguments
380 +# are replaced by the baud rate following the CONNECT response
381 +# from the modem or 19200 if none.  If using getty_ps ensure
382 +# /etc/gettydefs has entries for all possible %d values
383 +# (e.g. 19200). Use 'nice' if required to reduce any special
384 +# priority set by NICE.
385 +
386 +DCMD="exec /sbin/getty -h $DEV %d vt100"       # for getty_ps (Linux)
387 +# DCMD="exec /sbin/agetty -h $DEV %d vt100"    # for agetty (Linux)
388 +# DCMD="exec pppd $DEV %d"                     # start PPP server
389 +
390 +# Argument to exec(2) of "/bin/sh -c" for incoming voice calls.
391 +# This command will usually be a shell script that interacts with
392 +# the caller by using efone to play/record audio and detect DTMF
393 +# tones.  Up to 6 %d arguments are replaced by the modem file
394 +# descriptor.  VCMD can "exec fax reanswer" to switch to fax or
395 +# data mode if required.
396 +
397 +FONE=/usr/bin/fone                             # minimal voice mail
398 +VCMD="exec $FONE %d"
399 +
400 +# The owner.group and mode to which "fax answer" sets the serial
401 +# device.  This allows non-root processes to grab the device from
402 +# efax even if a previous process (e.g. login) has changed it.
403 +# Comment out if you don't need to reset device ownership.
404 +
405 +OWNER=root.tty         # typical
406 +MODE=666               # anybody
407 +# MODE=660             # only owner & group
408 +
409 +# Regular expression for efax exit codes in log files that will
410 +# *not* be saved.  For example, use [145] to ignore exits due to
411 +# `locked' (1), `no modem' (4), and `signal' (5) conditions
412 +
413 +NOLOG='[145]'
414 +
415 +# ****************************************************************
416 +# --- End of user configuration section ---
417 +# ****************************************************************
418 diff -Nur efax-0.9.orig/efaxio.c efax-0.9/efaxio.c
419 --- efax-0.9.orig/efaxio.c      Tue Apr 13 10:10:52 1999
420 +++ efax-0.9/efaxio.c   Tue Apr 13 10:11:01 1999
421 @@ -2,6 +2,7 @@
422  #include <signal.h>    
423  #include <stdio.h>
424  #include <string.h>
425 +#include <time.h>
426  
427  #include "efaxio.h"            /* EFAX */
428  #include "efaxmsg.h"
429 diff -Nur efax-0.9.orig/fax efax-0.9/fax
430 --- efax-0.9.orig/fax   Tue Apr 13 10:10:52 1999
431 +++ efax-0.9/fax        Tue Apr 13 10:16:11 1999
432 @@ -3,406 +3,9 @@
433  # fax - script to make, send, receive, view or print a fax
434  # Copyright 1993-1999 by Ed Casas 
435  # 
436 -# --- Start of user configuration section --- 
437 -# 
438 -# Notes: 
439 -#
440 -#  - do not put spaces before or after the equal (=) signs.
441 -#
442 -#  - variables can also be set on the command line, for example:
443 -#       fax DEV=cua0 send file.ps
444 -#    or in a configuration file (see CONFIGFILES below)
445 -#
446  
447 -# The names of the fax script, efax and efix, including full path
448 -# if necessary.
449 -
450 -FAX=fax
451 -EFAX=efax
452 -EFIX=efix
453 -
454 -# The device to which the fax modem is connected (e.g. ttya for
455 -# /dev/ttya).  Use a dial-out (cua) device if available.  If
456 -# there are links to this device then all programs must use same
457 -# name or the UUCP locking mechanism will fail.  For example, if
458 -# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
459 -# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
460 -
461 -DEV=cua1
462 -
463 -# Your fax number in international format, 20 characters maximum.
464 -# Use only digits, spaces, and the "+" character.
465 -
466 -FROM="+1 800 555 5555"
467 -
468 -# Your name as it should appear on the page header.
469 -
470 -NAME="Put Your Name Here"
471 -
472 -# The preferred page size for creating and printing faxes.
473 -# Allowed values are "letter", "legal", and "a4".
474 -
475 -PAGE=letter
476 -# PAGE=legal
477 -# PAGE=a4
478 -
479 -# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
480 -# Postscript.  See definition of PRINT (below) for more options.
481 -
482 -PRTYPE=ps                              # Postscript (e.g. Apple LaserWriter)
483 -# PRTYPE=pcl                           # HP-PCL (e.g. HP LaserJet) 
484 -
485 -# The command to print image files from standard input.  Typically
486 -# this is "lpr" or "lp".
487 -
488 -PRCMD="lpr"
489 -
490 -# The command to view a Portable Gray Map (PGM) image from the
491 -# standard input.  Typically "xv -" or "xloadimage stdin".
492 -
493 -VIEWCMD="xloadimage stdin"             # best
494 -# VIEWCMD="pnmtoxwd | xwud"            # slower alternative
495 -# VIEWCMD="xv -"                       # much slower alternative       
496 -
497 -# The name of the Ghostscript executable including full path if
498 -# necessary.  Only required if faxing Postscript files.
499 -
500 -GS=gs
501 -
502 -# Dial string prefix and suffix such as T for tone dialing, P for
503 -# pulse dialing, 9 to get an external line, commas for delays or
504 -# W to wait for dial tone.  See definition of TELCVT below if you
505 -# have more complex requirements.
506 -
507 -DIALPREFIX="T"
508 -DIALSUFFIX=""
509 -
510 -# The name(s) of lock file(s) according to your system's
511 -# conventions. Protect with single quotes for delayed evaluation.
512 -# Add a leading '#' to the file name to use binary format.
513 -
514 -LOCK='-x /var/lock/LCK..$DEV'                  # modern systems
515 -# LOCK='-x /usr/spool/uucp/LCK..$DEV'          # older systems
516 -# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
517 -# LOCK='-x #/usr/spool/uucp/LCK..$DEV'         # binary format
518 -# LOCK='-x /usr/spool/locks/LK.047.040.011'    # SysV style names
519 -# LOCK=''                                      # no lock file
520 -
521 -# Uncomment one of the following lines to force xon/xoff flow
522 -# control only if you have one of the types of modems listed.
523 -
524 -# FCINIT='-j\Q4'               # AT&T (Dataport, Paradyne)
525 -# FCINIT='-j\Q1'               # Motorola (Power Modem, 3400 Pro,...)
526 -# FCINIT='-j*F1'               # QuickComm (Spirit II)
527 -# FCINIT='-j&H2'               # USR (Courier, Sportster)
528 -# FCINIT='-or'                 # Multi-Tech (for bit reversal)
529 -
530 -# ****************************************************************
531 -# The remaining options probably won't need to be changed.
532 -# ****************************************************************
533 -
534 -# Configuration files that are sourced if they exist.  Comment
535 -# out if you don't need to use config files. Warning: any type of
536 -# shell command in these files will be executed.
537 -
538 -CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
539 -
540 -# A command that will generate unique names for logs and received
541 -# files.  'date +%m%d%H%M%S' works on most systems.  Protect with
542 -# single quotes.
543 -
544 -TSTAMP='date +%m%d%H%M%S'
545 -# TSTAMP='echo $$'             # alternative - use process number
546 -
547 -# Shell command to convert aliases to phone numbers when sending
548 -# faxes.  When executed $1 will be the alias and $f the file name
549 -# to search.  The example below uses a directory file where alias
550 -# lines start with the keyword "fax" followed by the alias in
551 -# parentheses and a colon.  The remainder of the line is taken to
552 -# be the phone number. Other lines are ignored.  For example, if
553 -# one of the files in DIRFILES (defined below) contained the line
554 -# "fax(kpmg): 691-3031", you could use the command "fax send kpmg
555 -# invoice.24". Protect with single quotes.
556 -
557 -LOOKUP='eval sed -n -e "/^fax($1):/{" -e "s/^[^:]*://p" -eq -e"}" $f'
558 -
559 -# List of telephone directory file(s) to be searched.  The
560 -# default is the file .faxdir in the user's home directory.
561 -
562 -DIRFILES="${HOME:-.}/.faxdir"
563 -
564 -# Shell command to convert phone numbers to dial strings.  This
565 -# lets you to store numbers without the long distance or
566 -# alternate carrier access codes, passwords, accounting digits,
567 -# etc.  In the examples below this is used to convert numbers
568 -# beginning with '+'; the first substitution handles same-country
569 -# calls and the second handles international calls.
570 -
571 -TELCVT='sed -e s/+1/1/ -e s/+/011/'    # North America
572 -# TELCVT='sed -e s/+61/0/ -e s/+/0011/' # Australia
573 -# TELCVT='sed -e s/+44/0/ -e s/+/00/'  # UK
574 -# TELCVT='sed -e s/+49/0/ -e s/+/00/'  # Germany
575 -# TELCVT='sed -e s/+852// -e s/+/001/' # Hong Kong
576 -# TELCVT='sed -e s/+33// -e s/+/19W/'  # France (?)
577 -# TELCVT='sed -e s/+34/0/ -e s/+/07W/' # Spain
578 -# TELCVT='sed -e s/+1/10288/'          # use AT&T
579 -# TELCVT='sed -e s/+/T82W1682W9W/'     # get out of PBX
580 -
581 -# efix options to use a bitmap font for text-to-fax conversion.
582 -# The option -l66 puts 66 lines of text per page, -d1,1 sets 1
583 -# inch top & left margin.  Comment these out to use the built-in
584 -# font. Use "fax makefont" to make bitmap fonts from Postscript
585 -# fonts.
586 -
587 -# TEXTFONT="-l66 -d1,1 -f /usr/bin/efaxfont"
588 -
589 -# efax options to specify a different font for headers. Generate
590 -# using "fax makefont."
591 -
592 -# HDRFONT="-f /usr/bin/efaxfont"
593 -
594 -# Dimensions of page sizes.
595 -
596 -PAGE_letter="8.465x11in"       # fax width x letter length
597 -PAGE_legal="8.465x14in"                # fax width x legal length
598 -PAGE_a4="21x29.7cm"            # ISO A4
599 -
600 -# Default resolution for converting to fax format. Can only be
601 -# 204x196 or 204x98.
602 -
603 -RES=204x196                    # default "Fine" resolution (196 lpi)
604 -# RES=204x98                   # standard resolution (98 lpi)
605 -
606 -# When the print and view commands below are executed, $f will be
607 -# the input file name and $PAGEDIM will be one of the above page
608 -# dimensions. Protect with single quotes.
609 -
610 -# PRINT: A command to convert fax files to a printable format.
611 -# For printers other than Postscript or PCL you can use efix's
612 -# PBM output and an appropriate pbm filter (such as pbmtoepson)
613 -# or efix's Postsript output and Ghostscript as a filter. Change
614 -# the scaling (-s) and displacement (-d) options as required to
615 -# fit the image onto the area your printer can print.
616 -
617 -PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f'
618 -
619 -# example using pbm utilities:
620 -# PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson'
621 -
622 -# example using Ghostscript:
623 -# PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \
624 -#      $GS -q  -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \
625 -#      -dNOPAUSE -dSAFER -sOutputFile=- - '
626 -
627 -# VIEW: A command to convert fax files to PGM format for
628 -# previewing.  efix's pgm output reduces image dimensions by 4X.
629 -
630 -# VIEW='$EFIX -ve -p$PAGEDIM -r200 -opgm $f'   # 50dpi: fast, whole-page view
631 -VIEW='$EFIX -ve -p$PAGEDIM -r300 -opgm $f'     # 75dpi: slower, readable size
632 -
633 -# Commands to set up modem.  "-iZ -i&FE&D2S7=120 -i&C0"
634 -# works with almost all modems.  See the efax(1) man page for
635 -# details.
636 -
637 -INIT="-iZ -i&FE&D2S7=120 -i&C0"
638 -
639 -# Command(s) to reset modem when efax finishes. "-kZ" works in
640 -# almost all cases.
641 -
642 -RESET="-kZ"
643 -# RESET="-kZ -k&F+FCLASS=0"    # for modems that stay in fax mode after reset
644 -
645 -# Speaker mode(M) and loudness(L). Mn sets speaker mode where n
646 -# means: 0:never, 1:until carrier, 2:always, 3:on receive only.
647 -
648 -SPKR="-iM1L0"
649 -
650 -# Options to use a particular command sets.  Normally efax
651 -# selects the command set based on the modem's capabilities.  Use
652 -# -o1 to force Class 1, -o2 for Class 2 and -o0 for Class 2.0.
653 -
654 -# CLASSINIT="-o1"      # Class 1
655 -# CLASSINIT=""         # Class 2
656 -# CLASSINIT="-o0"      # Class 2.0
657 -
658 -# The modem's capabilities for sending faxes.  Normally efax
659 -# chooses these by querying the modem.  "-c 1,3,0,0,0,0,0,0"
660 -# forces 9600 bps maximum speed.  See the efax(1) man page for a
661 -# description of the fields.
662 -
663 -# TXCAP="-c 1,3,0,2,0,0,0,0"
664 -
665 -# Capabilities for receiving faxes.  Usually the same as TXCAP.
666 -# If your modem only receives at 4800 bps use "-c 1,1,0,0,0,0,0,0".
667 -
668 -# RXCAP="$TXCAP"
669 -
670 -# Additional options required only for transmit or only for
671 -# receive.  None normally required.
672 -
673 -RXINIT=""
674 -TXINIT=""
675 -
676 -# Command to make a date for the page header. Protect with single
677 -# quotes.  'date "+%Y/%m/%d %H:%M"' works on most systems.
678 -
679 -DATECMD='date "+%Y/%m/%d %H:%M"'       # YYYY/MM/DD HH:MM (24hour)
680 -# DATECMD='date'                       # longer, more readable
681 -
682 -# Page header format.  You may use $DATE, $NAME, $FROM, $TO, and
683 -# "%d/%d" (for page number and count).  Protect with single
684 -# quotes.  Example: '$DATE $FROM $NAME p. %d/%d'.
685 -
686 -HDR='$DATE     $FROM      $NAME     p. %d/%d'
687 -
688 -# BUSYRETRIES is a list of delays in seconds between attempts to
689 -# redial busy numbers.  Comment out if you don't want to retry
690 -# busy numbers.
691 -
692 -BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60"
693 -
694 -# FAILRETRIES is a list of delays in seconds between attempts to
695 -# retry failed transmissions.  Retries are only attempted if at
696 -# least one page was sent in the previous attempt. Retries
697 -# include only pages not already sent. Comment out if you don't
698 -# want to retry failed transmissions.
699 -
700 -FAILRETRIES="300 300"  # try two more times at 5 minute intervals
701 -
702 -# Command to run another program (efax) at a higher-than-normal
703 -# scheduling priority.  This command isn't used if it fails
704 -# (e.g. because the current user isn't privileged).  Comment this
705 -# out if it causes problems.
706 -
707 -NICE="nice -n -10"
708 -
709 -# Standard versions of commands that are often aliased.
710 -
711 -RM="/bin/rm -f"
712 -LS="/bin/ls"
713 -
714 -# Messages to display.  VERB sets the messages displayed (stderr)
715 -# and VERBLOG the messages written to log files (stdout).
716 -
717 -VERB="ewin"            # show errors, warnings, progress & negotiation
718 -VERBLOG="chewmainrxtf" # log everything
719 -
720 -# ****************************************************************
721 -# The remaining configuration options apply only to the `fax
722 -# answer' command.  You can ignore these if you will only be
723 -# running efax manually.  See "USING INIT TO RUN EFAX" in the
724 -# efax man page for more information.
725 -# ****************************************************************
726 -
727 -# device or file where fatal error messages should be written
728 -
729 -CONSOLE=/dev/console
730 -
731 -# The directory to store incoming faxes and log files.  This directory
732 -# should already exist and be writable by the user(s) of this script.
733 -
734 -FAXDIR=/var/spool/fax
735 -LOGDIR=/var/log/fax
736 -
737 -# The strftime(3) pattern that generates the file name for
738 -# received files.  For example, at 10:45:36 on February 25,
739 -# "%m%d%H%M%S" would produce 0225104536, "%j-%H%M" would produce
740 -# 056-1045, and %d%b%H%M 25Feb1045.
741 -
742 -ANSFNAME="%m%d%H%M%S"
743 -
744 -# umask for received files. Use 022 to allow anyone to retrieve faxes.
745 -
746 -UMASK=022
747 -
748 -# The user to be sent mail when a fax is received.
749 -
750 -FAXMGR=root
751 -
752 -# The sendmail executable including full path if necessary.  Only
753 -# required if forwarding received faxes by e-mail in $NOTIFY.
754 -
755 -SENDMAIL=/usr/sbin/sendmail
756 -
757 -# The command to execute when a fax is received.  Normally this
758 -# sends FAXMGR e-mail or prints the received fax.  The variable
759 -# $f will be the name of the log file, $FILES will contain the
760 -# names of the received files, and $REMID will have the remote ID
761 -# string or '?' if none. The faxmail function will e-mail the fax
762 -# as MIME image/tiff attachments.  Comment this out to do
763 -# nothing.  Protect with single quotes.
764 -
765 -NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR'
766 -# NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f'
767 -# NOTIFY='lpr $f ; $FAX print $OPT $FILES'
768 -
769 -# The number of rings to wait before answering.
770 -
771 -ANSRINGS=1
772 -
773 -# If you want to enable fax/data adaptive answer (AA) read the
774 -# efax man page and define DATAINIT to be the options that enable
775 -# AA. Note: AA does not work properly on some (2400/9600) modems
776 -# unless the modem initialization is done at 2400 bps (not
777 -# possible with efax). USR modems do not support modem adaptive
778 -# answer (+FAE=) in Class 1.  &C1 enables most modems' DCD line
779 -# so a signal can be sent to shells when a call is dropped.  You
780 -# must also define DCMD (see below).
781 -
782 -DATAOPT="-j&C1 -j+FCLASS=0 -jS7=30"
783 -# DATAINIT="$DATAOPT -j+FAE=1"         # Class 1 modem adaptive answer
784 -# DATAINIT="$DATAOPT -j+FAA=1"         # Class 2[.0] modem adaptive answer
785 -# DATAINIT="$DATAOPT -oa"              # software adaptive answer
786 -# DATAINIT="$DATAOPT"                  # data-only answer
787 -
788 -# If you have a voice modem and want to answer in voice mode
789 -# define VOICEINIT to be the options that enable voice mode.  You
790 -# must also set VCMD below. Voice support is not yet available.
791 -
792 -# VOICEINIT="-j#CLS=8"                 # Rockwell voice modems
793 -# VOICEINIT="-jM2L2#CLS=8#VLS=4"       #    with speaker on
794 -
795 -# Argument to exec(2) of "/bin/sh -c" for incoming data calls.
796 -# This command will usually exec getty(8) but can include other
797 -# commands to set up the serial port, etc.  Up to 6 %d arguments
798 -# are replaced by the baud rate following the CONNECT response
799 -# from the modem or 19200 if none.  If using getty_ps ensure
800 -# /etc/gettydefs has entries for all possible %d values
801 -# (e.g. 19200). Use 'nice' if required to reduce any special
802 -# priority set by NICE.
803 -
804 -DCMD="exec /sbin/getty -h $DEV %d vt100"       # for getty_ps (Linux)
805 -# DCMD="exec /sbin/agetty -h $DEV %d vt100"    # for agetty (Linux)
806 -# DCMD="exec pppd $DEV %d"                     # start PPP server
807 -
808 -# Argument to exec(2) of "/bin/sh -c" for incoming voice calls.
809 -# This command will usually be a shell script that interacts with
810 -# the caller by using efone to play/record audio and detect DTMF
811 -# tones.  Up to 6 %d arguments are replaced by the modem file
812 -# descriptor.  VCMD can "exec fax reanswer" to switch to fax or
813 -# data mode if required.
814 -
815 -FONE=/usr/bin/fone                             # minimal voice mail
816 -VCMD="exec $FONE %d"
817 -
818 -# The owner.group and mode to which "fax answer" sets the serial
819 -# device.  This allows non-root processes to grab the device from
820 -# efax even if a previous process (e.g. login) has changed it.
821 -# Comment out if you don't need to reset device ownership.
822 -
823 -OWNER=root.tty         # typical
824 -MODE=666               # anybody
825 -# MODE=660             # only owner & group
826 -
827 -# Regular expression for efax exit codes in log files that will
828 -# *not* be saved.  For example, use [145] to ignore exits due to
829 -# `locked' (1), `no modem' (4), and `signal' (5) conditions
830 -
831 -NOLOG='[145]'
832 -
833 -# ****************************************************************
834 -# --- End of user configuration section ---
835 -# ****************************************************************
836 +# Read config file
837 +. /etc/sysconfig/efax
838  
839  # --- source configuration files
840  
This page took 0.162641 seconds and 3 git commands to generate.