]> git.pld-linux.org Git - packages/fax4CUPS.git/blame - fax4CUPS-hylafax.patch
- pass additional options
[packages/fax4CUPS.git] / fax4CUPS-hylafax.patch
CommitLineData
b08a369b
AM
1diff -urN fax4CUPS-1.24.org/hylafax fax4CUPS-1.24/hylafax
2--- fax4CUPS-1.24.org/hylafax 2004-07-07 14:45:06.000000000 +0200
383a5f45 3+++ fax4CUPS-1.24/hylafax 2005-03-13 02:51:52.000000000 +0100
a0193c08
AM
4@@ -4,8 +4,12 @@
5 NAME=""
6 PAGE=a4
b08a369b 7 FAXPRG=/usr/sbin/sendfax
a0193c08
AM
8+[ ! -x /usr/sbin/sendfax ] && FAXPRG="/usr/bin/sendfax"
9+
b08a369b
AM
10 FAXSTAT=/usr/bin/faxstat
11
383a5f45 12+[ -r /etc/cups/hylafax ] && . /etc/cups/hylafax
b08a369b
AM
13+
14 #
15 # This is fax4CUPS 1.24, a fax back-end for CUPS
16 #
a0193c08 17@@ -51,6 +55,7 @@
b08a369b
AM
18 # Get the user that owns the job
19 USER=$2
20 FROM=$USER
21+[ -n "$HYLAFAX_USER" ] && USER="$HYLAFAX_USER"
22
23 # Apparently the first character emitted is somehow "eaten" by the reader
24 echo 1>&2
a0193c08 25@@ -59,6 +64,10 @@
b08a369b
AM
26 # otherwise, it is empty and sendfax will read standard input.
27 FAXNAME=$6
28
29+# Remote host
30+HHOST=""
31+[ -n "$HYLAFAX_IP" ] && HHOST="-h $HYLAFAX_IP"
32+
33 # Set some defaults
34 RES="-m" # Default resolution is high; set this to -l for low resolution
35 NUMBER="" # Use option "phone" as number by default
a0193c08 36@@ -112,7 +121,7 @@
b08a369b
AM
37 echo "ERROR: $FAXPRG: executable not found" 1>&2
38 # Raise error and hang the queue: this is fatal !
39 exit 1
40-elif [ -z "$RUNNING" ]; then
41+elif [ -z "$HYLAFAX_IP" -a -z "$RUNNING" ]; then
42 echo "ERROR: HylaFAX not running" 1>&2
43 # Raise error and hang the queue: this is fatal !
44 exit 1
a0193c08 45@@ -121,9 +130,13 @@
b08a369b
AM
46 # Remove possible whitespace in number: replace by period
47 NUMBER=${NUMBER// /.}
48
49+if [ "$HYLAFAX_SUDO" != "no" ]; then
50 # Use sudo to make sure that job is owned by the user that wants to "print",
51 # not root. This is needed so that the owner of the job can remove it if needed.
52-sudo -u $USER $FAXPRG -s $PAGE $RES -n -f $FROM -d $NUMBER $FAXNAME
383a5f45 53+ sudo -u $USER $FAXPRG $HYLAFAX_OPT $HHOST -s $PAGE $RES -n -f $FROM -d $NUMBER $FAXNAME
b08a369b 54+else
383a5f45 55+ $FAXPRG $HYLAFAX_OPT $HHOST -s $PAGE $RES -n -f $FROM -d $NUMBER $FAXNAME
b08a369b
AM
56+fi
57
58 RC=$?
59 case $RC in
60diff -urN fax4CUPS-1.24.org/hylafax.ppd fax4CUPS-1.24/hylafax.ppd
61--- fax4CUPS-1.24.org/hylafax.ppd 2004-07-07 14:45:06.000000000 +0200
62+++ fax4CUPS-1.24/hylafax.ppd 2005-03-12 23:50:36.000000000 +0100
63@@ -44,6 +44,9 @@
64 *PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
65
66 *DefaultImageableArea: A4
67+*ImageableArea Letter/US Letter: "18 36 594 756"
68+*ImageableArea Legal/US Legal: "18 36 594 972"
69+*ImageableArea A4/A4: "18 36 577 806"
70
71 *DefaultPaperDimension: A4
72 *PaperDimension A4: "595 842"
This page took 0.067129 seconds and 4 git commands to generate.