a56bf1eb4a
* fix CAN-2004-1182: hfaxd client/server authentication vulnerability (10 Jan 2005) * fix possible filename race in tiff2pdf (10 Jan 2005) * improve modern distinctive ring support, add NoAnswerVoice config feature, and enhance third-party getty interaction (1, 2 Jan 2005) * add support for etc/resetmodem (30 Dec 2004) * fix NOTIFY_FAXMASTER within notify (30 Dec 2004) * improve tiff2pdf and use it more (29 Dec 2004) * fix 300 dpi support for some receivers (28 Dec 2004) * cause faxsetup to double-check and fix attachment encoding setup (27 Dec 2004) * add uuencode support in pollrcvd (27 Dec 2004) * add support for base64-encode (27 Dec 2004) * check strftime with arguments, gcc-3.3 fix (23 Dec 2004) * initialize some variables in some scripts that may not be initialzed in setup.cache (23, 27 Dec 2004) * remove need to have separate "fax" user (22 Dec 2004) * fix parsing of AT+FCLASS=? response within faxaddmodem and probemodem (21 Dec 2004) * improve multi-line handling within notify (20 Dec 2004) * improve trap handling in faxaddmodem/probemodem (17 Dec 2004) * fix hfaxd from rejecting jobs scheduled for the past while the killtime is still in the future (15 Dec 2004) * drop ftp links from received notification e-mail (8 Dec 2004) * fix dial-and-answer feature (2 Dec 2004) * add NSF recognition for MFC-3100C (29 Nov 2004) * fix Class 1 support for services "0,1.0" (26 Nov 2004) * limit hfaxd jobs cache size (23 Nov 2004) * fix hfaxd ABOR command and trigger (23 Nov 2004) * fix error when hfaxd FIFO fills (23 Nov 2004) * document -age option for recvstats/xferfaxstats (23 Nov 2004) * add coversheet information into the q-file (23 Nov 2004) * fix documentation regarding DesiredEC (23 Nov 2004) * change minsp to minbr for consistency (23 Nov, 2 Dec 2004) * fix hfaxd problem with file descriptors (23 Nov 2004) * fix hfaxd from dying on ECONNABORTED (23 Nov 2004) * add -fpic to DSO build for non-x86 Linux (23 Nov 2004) * add CALL records to xferfaxlog and LogCalls config (16 Nov 2004) * fix/implement desireddf in faxsend and faxq (29 Oct 2004) * fix the filetype output for JPARM DOCUMENTS (14 Oct 2004) * add SHIELDED_DTMF option for CIDNumber (7 Oct 2004) * add Class1Resolutions, deprecate Class1ExtendedRes (20 Sep 2004) * fix a bug in notify when the job is killed (15 Sep 2004) * initialize supplementary groups when switching uid (13 Sep, 8 Dec 2004) * fix faxsend to retrain after receiving RTP (9 Sep 2004) * fix tiffcheck unit comparison error (1 Sep 2004) * fix misconfirmation of some ECM faxes (30 Aug 2004) * add fax batching support to faxq (30 Aug, 9 Sep 2004) * ignore garbage after sending TCF data (26 Aug 2004) * fix truncation of filenames in faxcron (26 Aug 2004) * add configure support for libtiff 3.7 (25 Aug 2004) * extend short send-HDLC timeouts (18 Aug 2004) * add a pause after receiving MCF on non-ECM send sessions (18 Aug 2004) * fix broken fax polling (17 Aug 2004) * add several timing enhancements for stressed servers (16 Aug, 10, 15 Sep, 14 Oct 2004)
107 lines
3.3 KiB
Text
107 lines
3.3 KiB
Text
$NetBSD: patch-ai,v 1.9 2005/01/27 16:22:37 adam Exp $
|
|
|
|
--- etc/faxsetup.sh.in.orig 2004-12-28 04:45:04.000000000 +0000
|
|
+++ etc/faxsetup.sh.in
|
|
@@ -41,7 +41,9 @@
|
|
# This script interactively prepares and verifies
|
|
# a HylaFAX client and/or server machine for use.
|
|
#
|
|
-PATH=/bin:/usr/bin:/etc
|
|
+PREFIX=@PREFIX@
|
|
+#
|
|
+PATH=/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin
|
|
test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
|
|
test -d /usr/bsd && PATH=$PATH:/usr/bsd # Silicon Graphics
|
|
test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
|
|
@@ -60,6 +62,7 @@ FUSER=@FUSER@ # fuser command to dump
|
|
GREP=@GREP@ # grep command for use below
|
|
LN=@LN@ # ln command for use below
|
|
LN_S=@LN_S@ # ln option for creating a symbolic link
|
|
+MKDIR=@MKDIR@ # directory creation program for use below
|
|
MIMENCODE=@MIMENCODE@ # mimencode command to dump in setup.cache
|
|
MKFIFO=@MKFIFO@ # FIFO creation program for use below
|
|
MV=@MV@ # move file for use below
|
|
@@ -149,6 +152,7 @@ LIBEXEC DIR_LIBEXEC
|
|
LN
|
|
MANDIR DIR_MAN
|
|
MIMENCODE
|
|
+MKDIR
|
|
MKFIFO
|
|
MV
|
|
PATH
|
|
@@ -816,6 +820,61 @@ if [ "$euid" != "root" ]; then
|
|
boom
|
|
fi
|
|
|
|
+createspool()
|
|
+{
|
|
+ old_spool="`dirname ${DIR_SPOOL}`/fax"
|
|
+ if [ -d "${old_spool}" ]; then
|
|
+ cat <<EOF
|
|
+=================================================================
|
|
+
|
|
+ Found an existing ${old_spool}, probably from an older version
|
|
+ of the HylaFax package.
|
|
+ You might want to copy you customizations to @SPOOL@ after
|
|
+ faxsetup is done.
|
|
+
|
|
+=================================================================
|
|
+EOF
|
|
+ fi
|
|
+ if [ -d "${DIR_SPOOL}" ]; then
|
|
+ cat <<EOF
|
|
+=================================================================
|
|
+
|
|
+ @SPOOL@ already exists, probably from a previous run of
|
|
+ faxsetup -- I'm not touching it!
|
|
+
|
|
+ If you encounter problems, deinstall the HylaFax package,
|
|
+ remove @SPOOL@ and reinstall the package.
|
|
+
|
|
+=================================================================
|
|
+EOF
|
|
+ else
|
|
+ ${MKDIR} -p -m 0755 ${DIR_SPOOL}
|
|
+ ${MKFIFO} -m 0600 ${DIR_SPOOL}/FIFO
|
|
+ for i in archive docq doneq pollq sendq tmp ; do
|
|
+ ${MKDIR} -m 0700 ${DIR_SPOOL}/$i
|
|
+ done
|
|
+ for i in bin client config cover dev etc info log recvq status ; do
|
|
+ ${MKDIR} -m 0755 ${DIR_SPOOL}/$i
|
|
+ done
|
|
+ for i in `ls ${PREFIX}/share/hylafax/etc_template` ; do
|
|
+ ${CP} -p ${PREFIX}/share/hylafax/etc_template/$i \
|
|
+ ${DIR_SPOOL}/etc/$i
|
|
+ done
|
|
+ for i in `ls ${PREFIX}/share/hylafax/config_template` ; do
|
|
+ ${CP} -p ${PREFIX}/share/hylafax/config_template/$i \
|
|
+ ${DIR_SPOOL}/config/$i
|
|
+ done
|
|
+ for i in `ls ${PREFIX}/libexec/hylafax` ; do
|
|
+ ${CP} -p ${PREFIX}/libexec/hylafax/$i ${DIR_SPOOL}/bin/$i
|
|
+ done
|
|
+ ${CHOWN} -R ${PROTOUID}:${PROTOGID} ${DIR_SPOOL}
|
|
+ fi
|
|
+}
|
|
+
|
|
+Note "Creating spool directory structure"
|
|
+
|
|
+createspool
|
|
+
|
|
onClient && Note "Checking system for proper client configuration."
|
|
onServer && Note "Checking system for proper server configuration."
|
|
|
|
@@ -2214,12 +2273,7 @@ if onServer; then
|
|
|
|
findproc()
|
|
{
|
|
- # NB: ps ax should give an error on System V, so we try it first!
|
|
- pid="`ps ax 2>/dev/null | $AWK \"\
|
|
- /[\/ (]$1[ )]/ {print \\$1;}
|
|
- /[\/ ]$1\$/ {print \\$1;}\"`"
|
|
- test "$pid" ||
|
|
- pid="`ps -e 2>/dev/null | $AWK \"/ $1[ ]*\$/ {print \\$1;}\"`"
|
|
+ pid="`ps -ax | grep -e "[/ (]$1[ )]" -e "[/ ]$1\$" | grep -v grep | head -1 | cut -c1-5`"
|
|
echo "$pid"
|
|
}
|
|
|