#!/bin/sh -e
##  by Giuseppe Sacco <eppesuig@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Change from address in all e-mail from fax to faxmaster
## DP: See debian bug #386071

if [ $# -lt 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

#@DPATCH@
#EOF
diff -urNad hylafax-4.3.2~/util/faxrcvd.sh.in hylafax-4.3.2/util/faxrcvd.sh.in
--- hylafax-4.3.2~/util/faxrcvd.sh.in	2007-02-21 18:18:29.000000000 +0100
+++ hylafax-4.3.2/util/faxrcvd.sh.in	2007-02-21 18:18:30.000000000 +0100
@@ -65,7 +65,7 @@
 FAX2PS=$TIFFBIN/fax2ps
 TIFF2PS=tiff2ps
 TOADDR=FaxMaster
-FROMADDR=fax
+FROMADDR=FaxMaster
 TIFFINFO=tiffinfo
 NOTIFY_FAXMASTER=always
 
diff -urNad hylafax-4.3.2~/util/notify-4.2.sh.in hylafax-4.3.2/util/notify-4.2.sh.in
--- hylafax-4.3.2~/util/notify-4.2.sh.in	2006-12-24 02:43:49.000000000 +0100
+++ hylafax-4.3.2/util/notify-4.2.sh.in	2007-02-21 18:27:05.000000000 +0100
@@ -97,7 +97,7 @@
 PS2FAX=bin/ps2fax
 PDF2FAX=bin/pdf2fax
 TOADDR=FaxMaster
-FROMADDR=fax
+FROMADDR=FaxMaster
 NOTIFY_FAXMASTER=never
 RETURNFILETYPE=
 MIMEBOUNDARY="NextPart$$"
diff -urNad hylafax-4.3.2~/util/notify.sh.in hylafax-4.3.2/util/notify.sh.in
--- hylafax-4.3.2~/util/notify.sh.in	2007-02-08 22:33:19.000000000 +0100
+++ hylafax-4.3.2/util/notify.sh.in	2007-02-21 18:18:30.000000000 +0100
@@ -71,7 +71,7 @@
 PS2FAX=bin/ps2fax
 PDF2FAX=bin/pdf2fax
 TOADDR=FaxMaster
-FROMADDR=fax
+FROMADDR=FaxMaster
 NOTIFY_FAXMASTER=never
 RETURNFILETYPE=
 MIMEBOUNDARY="NextPart$$" RETURNTECHINFO=yes 
diff -urNad hylafax-4.3.2~/util/pollrcvd.sh.in hylafax-4.3.2/util/pollrcvd.sh.in
--- hylafax-4.3.2~/util/pollrcvd.sh.in	2007-02-08 22:33:19.000000000 +0100
+++ hylafax-4.3.2/util/pollrcvd.sh.in	2007-02-21 18:26:03.000000000 +0100
@@ -66,7 +66,7 @@
 FAX2PS=$TIFFBIN/fax2ps
 TIFF2PS=tiff2ps
 TOADDR=FaxMaster
-FROMADDR=fax
+FROMADDR=FaxMaster
 TIFFINFO=tiffinfo
 NOTIFY_FAXMASTER=always
 
diff -urNad hylafax-4.3.2~/util/wedged.sh.in hylafax-4.3.2/util/wedged.sh.in
--- hylafax-4.3.2~/util/wedged.sh.in	2006-12-24 02:43:49.000000000 +0100
+++ hylafax-4.3.2/util/wedged.sh.in	2007-02-21 18:18:31.000000000 +0100
@@ -73,7 +73,7 @@
 # Variables customizable through etc/FaxDispatch
 #
 TOADDR=FaxMaster
-FROMADDR=fax
+FROMADDR=FaxMaster
 WEDGED_EMAIL_INTERVAL=5		# minutes: at most 1 wedged email every X mins
 WEDGED_DISABLE_FAXGETTY=	# if set, faxgetty disabled from inittab
 
