Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] printer to fax
Michel Donais schrieb:
>
> O/s : Sco Openserver 5.0.4
>
> Did somebody use or is aware of a script to get HylaFAX
> acting as a Unix printer.
>
> Michel
>
> ____________________ HylaFAX(tm) Users Mailing List _______________________
> To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
I made my sparc system V printing system working with hylafax.
I added a new printer called "fax". (with lpadmin)
I have no clue how to setup the bsd-lpr printing system.
The interface file for the printer
looks like this: (the "printer is expecting PostScript file as input)
the script parses the postscript file for a string "FAX:" to find out
the dest-number
but take a look in the script, and you will see
HIH
matthias
--
HAGOS eG phone: +49 711 7880592
Matthias Reich fax: +49 711 7880599
Industriestr. 62 web: http://www.hagos.de
D-70565 Stuttgart mail: rei@hagos.de
Germany
----------------------------------------------------------------------------
Be careful your mail is read by the NSA too !!
# Please Do Not Remove or Move This Line, wpport uses it
for option in $5
do
if [ -x $option/wpp ]
then
$option/wpp <$6
exit 0
elif [ $option = WPREMOTE -o $option = WPOTHER ]
then
copies=$4
while [ "$copies" -gt 0 ]
do
cat $6 2>&1
copies=`expr $copies - 1`
done
exit 0
fi
done
# Please Do Not Remove or Move This Line, wpport uses it
#
# Im Dokument muss der String "FAX:<faxno>" enthalten sein,
# wobei <faxno> fuer die Fax-Nummer steht, an die das Dokument
# gesendet werden soll.
# Beim Faxen von PostScript-Dokumenten muss beim Aufruf des
# Kommandos "fax" die Variable fixedopts definiert werden.
#
FAXSERVER=faxserver
export FAXSERVER
if [ -x /usr/bin/nawk ] # wenn vorhanden, nehmen wir nawk
then
AWK=nawk
else
AWK=awk
fi
printer=$0
request_id="$1"
user=$2
absender=`echo "$2" | cut -d! -f2`
nummer=`echo "$1" | cut -d- -f2`
absender=`echo "$user" | cut -d! -f2`
nummer=`echo "$request_id" | cut -d- -f2`
nummer="wp.$nummer"
search="FAX:" # find fax-number with this pattern
betreff="Fax-Name:" # find fax
ergebnis="$*"
shift 5
files="$*"
for file in ${files}
do
faxno=`sed -ne '/'$search'/{s/^.*'$search'[ ]*//g;
s/[()]//g;s/[^0-9a-zA-Z]\{1,\}.*$//g;p;q;}' < $file`;
der_name=`sed -ne '/'$betreff'/{s/^.*'$betreff'[ ]*//g;
s/[()]//g;s/[^0-9a-zA-Z-]\{1,\}.*$//g;p;q;}' < $file`;
if [ -z "$der_name" ]
then
ausdruck=$nummer
else
ausdruck=$der_name
fi
# no environment therefore complete path
/opt/local/fax/bin/sendfax -N -f "$absender" -i "$ausdruck" -d "$faxno" $file;
done
exit 0