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