[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [efax-users] Receiving faxes to multiple printers

On Wed, 2003-06-18 at 21:15, Ed Casas wrote:

> Since the fax script just sources the configuration files you
> should be able to put something like:
> case $DEV in
>         ttyR1) PRCMD='lpr -PPrinter1' ;;
>         ttyR2) PRCMD='lpr -PPrinter2' ;;
> esac
> in /etc/efax.rc

I looked at that route but decided that it would not work.  The "fax"
program loads and evals all of the config files (including /etc/efax.rc)
before it parses the command line options.  Thus "DEV" is never set when
the efax.rc file is eval'd and the case always falls through to the
default (I just tested this).

See lines 409 through 422 in /usr/bin/fax.

I thought about reordering the lines so it processes the command line
arguments first but then DEV gets overwritten if it's set anywhere in
the config files as a default (which it is in the efax-0.9-12 RPM I'm
using).  So I could remove it from there but it seems like there should
be a cleaner way to process variable overrides...