Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
hylafax
hylafax-4.4.4.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File hylafax-4.4.4.dif of Package hylafax
Index: hylafax-4.4.4/Makefile.Linux =================================================================== --- /dev/null +++ hylafax-4.4.4/Makefile.Linux @@ -0,0 +1,3 @@ +extract: + tar xIfp ../hylafax-SuSE.tar.bz2 + Index: hylafax-4.4.4/config.site =================================================================== --- hylafax-4.4.4.orig/config.site +++ hylafax-4.4.4/config.site @@ -55,16 +55,16 @@ # # Directory parameters. # -#DIR_BIN="/usr/local/bin" # directory for client apps -#DIR_LIB="/usr/local/lib" # directory for libfaxserver, libfaxutil -#DIR_LIBDATA="/usr/lib/fax" # directory for client data -#DIR_LIBEXEC="/usr/lib/fax" # directory for libraries&hidden apps -#DIR_MAN="/usr/local/man" # directory for manual pages -#DIR_SPOOL="/var/spool/hylafax" # directory for spooling area -#DIR_SBIN="/var/spool/hylafax/bin" # directory for system apps -#DIR_LOCKS="/usr/spool/locks" # directory for UUCP lock files +DIR_BIN="/usr/bin" # directory for client apps +DIR_LIB="/usr/lib" # directory for libfaxserver, libfaxutil +DIR_LIBDATA="/usr/lib/fax" # directory for client data +DIR_LIBEXEC="/usr/lib/fax" # directory for libraries&hidden apps +DIR_MAN="/usr/share/man" # directory for manual pages +DIR_SPOOL="/var/spool/fax" # directory for spooling area +DIR_SBIN="/usr/sbin" # directory for system apps +DIR_LOCKS="/var/spool/locks" # directory for UUCP lock files #FONTMAP="/usr/share/ghostscript/3.33" # directorys containing Fontmap files -#PATH_AFM="/usr/lib/DPS/AFM" # directorys for AFM files +#PATH_AFM="/usr/share/ghostscript/fonts" # directorys for AFM files # # Miscellaneous parameters. @@ -73,16 +73,16 @@ #FILLORDER="MS2LSB" # bit order of cpu (MSB2LSB/LSB2MSB) #FAXGID="uucp" # group ID for fax user #FAXUID="uucp" # user ID for fax user -#PAGESIZE="North American Letter" # default page size +PAGESIZE="ISO A4" # default page size #SYSGID="sys" # group ID for system installs #SYSUID="bin" # user ID for system installs #LOCKS="ascii" # default UUCP lockfile scheme # -#PATH_GETTY="/etc/getty" # pathname of suitable getty program -#PATH_VGETTY="/bin/vgetty" # pathname of voice getty program -#PATH_EGETTY="/bin/egetty" # pathname of external getty program -#PATH_SENDMAIL="/usr/lib/sendmail" # pathname of suitable sendmail program -#PATH_GSRIP="/usr/local/bin/gs" # pathname of Ghostscript-based RIP +PATH_GETTY="/usr/sbin/mgetty" # pathname of suitable getty program +PATH_VGETTY="/usr/sbin/vgetty" # pathname of voice getty program +PATH_EGETTY="/usr/sbin/egetty" # pathname of external getty program +PATH_SENDMAIL="/usr/sbin/sendmail" # pathname of suitable sendmail program +PATH_GSRIP="/usr/bin/gs" # pathname of Ghostscript-based RIP #PATH_DPSRIP="/var/spool/hylafax/bin/ps2fax.exe" # pathname of DPS-based RIP #PATH_IMPRIP="/usr/lib/print/psrip" # pathname of Impressario 2.1 RIP #MANSCHEME="sysv-source-cat-strip" # manual page installation scheme @@ -118,8 +118,8 @@ #CXX="gcc" # name/pathname of C++ compiler #CXXFILE="-x c++" # options for proper C++ processing #ENVOPTS="-Aa" # options for getting ANSI C -#GCOPTS="-g" # options to pass C compiler -#GCXXOPTS="-g" # options to pass C++ compiler +GCOPTS="-O2" # options to pass C compiler +GCXXOPTS="-O2" # options to pass C++ compiler #GENDIST="/sbin/gendist" # pathname of SGI inst generator program #INSTALL='${SHELL} ${PORT}/install.sh' # SGI install program/emulator #LIBMALLOC="auto" # yes|no|auto configure -lmalloc use @@ -141,9 +141,9 @@ # to link against. If libtiff is installed in a # non-standard location then setup LIBTIFF accordingly. # -#LIBTIFF="-L/usr/local/lib -ltiff" # linkage convention for libtiff -#TIFFINC="/usr/local/include" # place to find tiffio.h -#TIFFBIN="/usr/local/bin" # where TIFF tools live +LIBTIFF="-ltiff -ljpeg" # linkage convention for libtiff +TIFFINC="/usr/include" # place to find tiffio.h +TIFFBIN="/usr/bin" # where TIFF tools live # # The source for the ZLIB library is not required @@ -151,8 +151,9 @@ # to link against. If ZLIB is installed in a # non-standard location then setup LIBZ accordingly. # -#LIBZ="-L/usr/local/lib -lz" # linkage convention for libz +LIBZ="-lz" # linkage convention for libz #ZLIBINC="-I/usr/local/include" # place to find zlib.h +ZLIBINC="../regex" # to find distributed regex.h # # The source for the POSIX regular expression package @@ -255,5 +256,5 @@ #MV_F="-f" # option to ${MV} to force operation #RMCMD="/bin/rm" # pathname of suitable rm program #SED="/bin/sed" # pathname of suitable sed program -#SCRIPT_SH="/bin/sh" # pathname of suitable shell +SCRIPT_SH="/bin/sh" # pathname of suitable shell #SORT="/bin/sort" # pathname of suitable sort program Index: hylafax-4.4.4/configure =================================================================== --- hylafax-4.4.4.orig/configure +++ hylafax-4.4.4/configure @@ -263,7 +263,7 @@ ZLIBINC" dumpvars() { (for i do echo "$i"; done) | - while read a b; do eval c=\$${b:-$a}; echo "/@$a@/s;;$c;g"; done + while read a b; do eval c=\$${b:-$a}; echo "s;@$a@;$c;g"; done } dumpvals() { @@ -789,6 +789,7 @@ checkGCCVersion() app=$1; shift eval `$app -v 2>&1 | \ sed -n -e '/[Vv]ersion/s/[^(]* [a-z\-]*\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/GCCdist=\1;GCCmajor=\2;GCCminor=\3/p'` + test -z "$GCCminor" && GCCminor=0 GCCversion="${GCCdist}.${GCCmajor}.${GCCminor}"; export GCCversion if [ ${GCCdist} -gt $1 ]; then return 0 @@ -914,7 +915,7 @@ if [ -z "$GCOPTS" ]; then Note "Looks like $CCOMPILER supports the -g option." # NB: cannot use captureX here 'cuz we lose stderr if $CCOMPILER $ENVOPTS $GCOPTS -c -g -O dummy.c >t 2>&1 && CheckForGandO t; then - GCOPTS="$GCOPTS -g" + GCOPTS="$GCOPTS" else Note "... but not together with the -O option, not using it." fi @@ -1075,7 +1076,7 @@ if [ -z "$GCXXOPTS" ]; then Note "Looks like $CXXCOMPILER supports the -g option." # NB: cannot use captureX here 'cuz we lose stderr if $CXXCOMPILER $ENVOPTS -c -g -O dummy.C >t 2>&1 && CheckForGandO t; then - GCXXOPTS="$GCXXOPTS -g" + GCXXOPTS="$GCXXOPTS" else Note "... but not together with the -O option, not using it." fi @@ -1306,7 +1307,7 @@ if [ -z "$RANLIB" ]; then fi cat>dummy.C<<EOF -#include "new.h" +#include <new> struct foo { int x; foo(); @@ -1418,7 +1419,8 @@ runMake() CheckForCXXRuntime() { cat>t.c++<<EOF -#include "iostream.h" +#include <iostream> +using namespace std; int main(){ cout << "Hello World!" << endl; return 0;} EOF runMake t "t:; \${C++F} \${C++FILE} t.c++${MAKECXXOVERRIDE}" @@ -2923,7 +2925,7 @@ BuildPortDotH() Note "... configure use of logwtmp (BSD-style wtmp logging)" CheckForFuncDecl logwtmp utmp.h || { AddFuncDecl logwtmp \ - 'int logwtmp(const char*, const char*, const char*);' + 'void logwtmp(const char*, const char*, const char*);' } CheckForLibrary logout -lutil && { echo '#define HAS_LOGOUT 1' @@ -3381,7 +3383,7 @@ if [ "$DSO" = auto ]; then echo 'int f() { return 0; }'>t.c capture cat t.c runMake t \ - 't.o:; ${CCF} -c t.c' \ + 't.o:; ${CCF} -fpic -c t.c' \ "t: t.o; \${CCF} ${DSOOPTS} -o t.${DSOSUF} t.o" } CheckCXXDSO() @@ -3428,7 +3430,7 @@ if [ "$DSO" = auto ]; then echo 'int f() { return 0; }'>t.c++ capture cat t.c++ runMake t \ - "t.o:; \${C++F} -c \${C++FILE} t.c++${MAKECXXOVERRIDE}" \ + "t.o:; \${C++F} -fpic -c \${C++FILE} t.c++${MAKECXXOVERRIDE}" \ "t:t.o; \${C++F} ${DSOOPTS} -o t.${DSOSUF} t.o" } ;; Index: hylafax-4.4.4/defs.in =================================================================== --- hylafax-4.4.4.orig/defs.in +++ hylafax-4.4.4/defs.in @@ -154,7 +154,7 @@ MACHDEPLIBS = @MACHDEPLIBS@ # insufficient to locate the library you can setup a config.local # file that defines LIBTIFF and/or TIFFINC (used to find tiffio.h) # -TIFFINC = @TIFFINC@ +#TIFFINC = @TIFFINC@ LIBTIFF = @LIBTIFF@ TIFFBIN = @TIFFBIN@ # @@ -165,7 +165,7 @@ TIFFBIN = @TIFFBIN@ # insufficient to locate the library you can setup a config.local # file that defines LIBZ and/or ZINC (used to find zlib.h) # -ZLIBINC = @ZLIBINC@ +#ZLIBINC = @ZLIBINC@ LIBZ = @LIBZ@ # # libdb-related definitions. The source for the libdb library @@ -225,7 +225,7 @@ GCINCS = -I. -I${DEPTH} -I${REGEXINC} - # # C++ flags are decomposed using the same hierarchy as C flags. # -C++FLAGS = ${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS} +C++FLAGS = ${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS} -D_GNU_SOURCE VC++FLAGS = ${VC++DEFS} ${VC++INCS} ${VC++OPTS} LC++FLAGS = ${LC++DEFS} ${LC++INCS} ${LC++OPTS} Index: hylafax-4.4.4/etc/Makefile.in =================================================================== --- hylafax-4.4.4.orig/etc/Makefile.in +++ hylafax-4.4.4/etc/Makefile.in @@ -41,6 +41,7 @@ DEPTH=.. SRCDIR = ${DEPTH}/${TOPSRCDIR}/etc VPATH = ../@SRCDIR@/etc +DESTDIR = / DIR_SYSVINIT = @SYSVINITDIR@ DIR_SYSVINITSTART = @SYSVINITSTARTDIR@ DIR_SYSVINITSTOP = @SYSVINITSTOPDIR@ Index: hylafax-4.4.4/etc/faxaddmodem.sh.in =================================================================== --- hylafax-4.4.4.orig/etc/faxaddmodem.sh.in +++ hylafax-4.4.4/etc/faxaddmodem.sh.in @@ -255,6 +255,14 @@ EOF faxGID=`$GREP "^$PROTOGID:" $GROUP | cut -d: -f3` if [ -z "$faxGID" ]; then faxGID=$defPROTOGID; fi +if [ -x /usr/sbin/faxaddmodem.capi ]; then + promptForBooleanParameter no "Do you want setup a CAPI 2.0 based ISDN modem" + if [ "$param" = "yes" ]; then + /usr/sbin/faxaddmodem.capi $TTY + exit + fi +fi + while [ -z "$TTY" ] || [ ! -c /dev/$TTY ]; do test "$TTY" != "" && echo "/dev/$TTY is not a terminal device." prompt "Serial port that modem is connected to [$TTY]?"; read TTY @@ -494,7 +502,9 @@ defaultIXOAckTimeout=\"\" setupServerParameters() { for i in $ServerParameters; do + set -o noglob eval $i=\$default$i + set +o noglob done } @@ -516,11 +526,11 @@ getServerParameters() echoServerSedCommands() { (for i in $RequiredServerParameters; do - eval echo \"$i:\$$i:\" + eval echo -e \"$i\\x00\$$i\\x00\" done for i in $OptionalServerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); @@ -652,8 +662,8 @@ EOF printServerConfig() { (for i in $ServerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); @@ -670,6 +680,7 @@ if [ -f $SCHEDCONFIG ]; then echo "Reading scheduler config file $SCHEDCONFIG." echo "" getServerParameters $SCHEDCONFIG + schedconfig="yes" fi if [ -f $CONFIG ] || [ -z "$OLDCONFIG" ]; then OLDCONFIG=$CONFIG @@ -683,9 +694,13 @@ else echo "" getServerParameters $MODEMCONFIG/skel # get from skeletal file ok="prompt" # prompt for parameters + # restore overwritten allready entered values + if [ "$schedconfig" = "yes" ]; then + getServerParameters $SCHEDCONFIG + fi fi -if [ -z "$FAXNumber" ]; then +if [ -z "$FAXNumber" -o "+1.999.555.1212" = "$FAXNumber" ]; then FAXNumber="+$CountryCode $AreaCode 555-1212" fi @@ -821,7 +836,7 @@ SendToModem() sleep 1 # wait for previous kill case $TARGET in *-linux*) ;; - *) onDev $STTY 0; sleep 1 ;; # reset the modem (hopefully) + *) onDev $STTY -clocal; sleep 1 ;; # reset the modem (hopefully) esac # start listening for output onDev -c "$STTY clocal && exec $CAT $tdev"; sleep 2 @@ -878,12 +893,13 @@ while [ -z "$RESULT" ]; do # reset the modem. If something goes wrong, it'll # nag the user to check on the problem. # - (trap "exit 1" 1 2 15; + (trap "exit 1" 1 2; while true; do sleep 10; echo "" echo "Hmm, something seems to be hung, check your modem eh?" done)& nagpid=$! + trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 0" 0 trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 1 2 15 SendToModem "AT+FCLASS=?" # ask for class support @@ -892,6 +908,7 @@ while [ -z "$RESULT" ]; do wait $nagpid # Really waits its end exec 2>&3 3>&- # Restore stderr + trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 0" 0 trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 1 2 15 sleep 1 @@ -1400,20 +1417,38 @@ echoModemSedCommands() ModemCmds="" (for i in $ModemParameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval x=\$$i + x=`echo $x | $SED 's/&/\\\\&/g'` + eval $i=\$x + eval x="\$proto$i" + x=`echo $x | $SED 's/&/\\\\&/g'` + eval proto$i=\$x + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done case "$ModemType" in Class1*) for i in $Class1Parameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval x="\$$i" + x=`echo $x | $SED 's/&/\\\\&/g'` + eval $i=\$x + eval x="\$proto$i" + x=`echo $x | $SED 's/&/\\\\&/g'` + eval proto$i=\$x + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done ;; Class2*) for i in $Class2Parameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval x="\$$i" + x=`echo $x | $SED 's/&/\\\\&/g'` + eval $i=\$x + eval x="\$proto$i" + x=`echo $x | $SED 's/&/\\\\&/g'` + eval proto$i=\$x + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done ;; - esac) | $AWK -F: ' + esac) | $AWK -F'\000' ' function p(tag, value) { if (match(value, "^[^\"].*[ ]") == 0) @@ -1469,20 +1504,20 @@ checkFlowControlAgainstTTY() printModemConfig() { (for i in $ModemParameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done case "$ModemType" in Class1*) for i in $Class1Parameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done ;; Class2*) for i in $Class2Parameters; do - eval echo \"$i:\$$i:\$proto$i\" + eval echo -e \"$i\\x00\$$i\\x00\$proto$i\" done ;; - esac) | $AWK -F: ' + esac) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); @@ -1613,7 +1648,7 @@ AT Class1EOPWaitCmd \ Maximum time to wait for OK after aborting a receive (ms) # Class1RecvIdentTimer \ Maximum wait for initial identification frame (ms) -# Class1SwitchingCmd \ +S Class1SwitchingCmd \ Command to ensure silence after receiving HDLC and before sending # Class1TCFRecvTimeout Timeout for receiving TCF (ms) EOF @@ -1755,7 +1790,7 @@ test -p $FIFO || { die fi } -$CHOWN $FAX $FIFO; $CHGRP $faxGID $FIFO; $CHMOD 600 $FIFO +$CHOWN uucp.uucp $FIFO; $CHMOD 600 $FIFO if [ "$OLDFIFO" ]; then echo "Removing old fifo $OLDFIFO."; $RMCMD $OLDFIFO; @@ -1783,6 +1818,7 @@ RequiredSchedulerParameters=" InternationalPrefix DialStringRules ServerTracing + SessionTracing " OptionalSchedulerParameters=" ContCoverPage @@ -1798,7 +1834,6 @@ OptionalSchedulerParameters=" SendFaxCmd SendPageCmd SendUUCPCmd - SessionTracing TimeOfDay Use2D " @@ -1865,11 +1900,11 @@ CheckedParameters=" echoSchedulerParameters() { (for i in $RequiredSchedulerParameters; do - eval echo \"$i:\$$i:\" + eval echo -e \"$i\\x00\$$i\\x00\" done for i in $OptionalSchedulerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); @@ -1887,8 +1922,8 @@ $2 != $3{ p($1, $2) }' printSchedulerConfig() { (for i in $SchedulerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); Index: hylafax-4.4.4/etc/faxsetup.sh.in =================================================================== --- hylafax-4.4.4.orig/etc/faxsetup.sh.in +++ hylafax-4.4.4/etc/faxsetup.sh.in @@ -922,6 +922,7 @@ if onServer; then (umask 077 ; mkdir $TMPDIR) || exit 1 JUNK="etc/setup.tmp" + trap "$RM \$JUNK; $RM -r \$TMPDIR; exit 0" 0 trap "$RM \$JUNK; $RM -r \$TMPDIR; exit 1" 1 2 15 exec 5>etc/setup.tmp @@ -2077,6 +2078,7 @@ RequiredSchedulerParameters=" InternationalPrefix DialStringRules ServerTracing + SessionTracing " OptionalSchedulerParameters=" ContCoverPage @@ -2092,7 +2094,6 @@ OptionalSchedulerParameters=" SendFaxCmd SendPageCmd SendUUCPCmd - SessionTracing TimeOfDay Use2D " @@ -2121,11 +2122,11 @@ SchedulerParameters=" echoSchedulerParameters() { (for i in $RequiredSchedulerParameters; do - eval echo \"$i:\$$i:\" + eval echo -e \"$i\\x00\$$i\\x00\" done for i in $OptionalSchedulerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); @@ -2143,8 +2144,8 @@ $2 != $3{ p($1, $2) }' printSchedulerConfig() { (for i in $SchedulerParameters; do - eval echo \"$i:\$$i:\$default$i\" - done) | $AWK -F: ' + eval echo -e \"$i\\x00\$$i\\x00\$default$i\" + done) | $AWK -F'\000' ' function p(tag, value) { tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8)); Index: hylafax-4.4.4/etc/hylafax.in =================================================================== --- hylafax-4.4.4.orig/etc/hylafax.in +++ hylafax-4.4.4/etc/hylafax.in @@ -47,6 +47,19 @@ # # NB: This script assumes faxgetty processes are managed by init # +### BEGIN INIT INFO +# Provides: hylafax +# Required-Start: $remote_fs +# Should-Start: ypbind isdn +# Required-Stop: $remote_fs +# Should-Stop: ypbind isdn +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Description: Start hylafax fax server daemon +### END INIT INFO + +. /etc/rc.status + SPOOL=@SPOOL@ test -f $SPOOL/etc/setup.cache || { @@ -55,7 +68,7 @@ test -f $SPOOL/etc/setup.cache || { FATAL ERROR: $SPOOL/etc/setup.cache is missing! The file $SPOOL/etc/setup.cache is not present. This -probably means the machine has not been setup using the faxsetup(@MANNUM1_8@) +probably means the machine has not been setup using the faxsetup(1M) command. Read the documentation on setting up HylaFAX before you startup a server system. @@ -64,24 +77,18 @@ EOF } . $SPOOL/etc/setup.cache -# Just in case these are not in setup.cache yet -if [ -z "$HFAXD_SERVER" ]; then - HFAXD_SERVER=@HFAXD_SERVER@ -fi -if [ -z "$FAXQ_SERVER" ]; then - FAXQ_SERVER=@FAXQ_SERVER@ +if [ -z $HFAXD_SERVER ]; then + HFAXD_SERVER=1 fi -if [ -z "$HFAXD_OLD_PROTOCOL" ]; then - HFAXD_OLD_PROTOCOL=@HFAXD_OLD_PROTOCOL@ -fi -if [ -z "$HFAXD_SNPP_SERVER" ]; then - HFAXD_SNPP_SERVER=@HFAXD_SNPP_SERVER@ +if [ -z $FAXQ_SERVER ]; then + FAXQ_SERVER=1 fi IS_ON=/etc/chkconfig # NB: chkconfig is IRIX- and Linux-specific -FAXQ=$SBIN/faxq -HFAXD=$LIBEXEC/hfaxd -FAXQUIT=$SBIN/faxquit +FAXQ=@SBIN@/faxq +HFAXD=@LIBEXEC@/hfaxd +FAXQUIT=@SBIN@/faxquit +KILLALL=/usr/bin/killall FAXPORT=hylafax # designated port for new protocol SNPPPORT=444 # official port for SNPP @@ -90,107 +97,57 @@ if test ! -x $IS_ON ; then fi if $IS_ON verbose ; then - ECHO=echo + ECHO="echo -e" else # For a quiet startup and shutdown ECHO=: fi -# -# Figure out which brand of echo we have and define prompt -# and printf shell functions accordingly. Note that we -# assume that if the System V-style echo is not present, -# then the BSD printf program is available. These functions -# are defined here so that they can be tailored on a per-site, -# etc. basis. -# -if [ `echo foo\\\c`@ = "foo@" ]; then - # System V-style echo supports \r - # and \c which is all that we need - printf() - { - $ECHO "$*\\c" - } -elif [ "`echo -n foo`@" = "foo@" ]; then - # BSD-style echo; use echo -n to get - # a line without the trailing newline - printf() - { - $ECHO -n "$*" - } -else - # something else; do without - printf() - { - $ECHO "$*" - } -fi - -# -# -# killall -SIGNAL process-name -# -# Emulate the necessary functionality of the -# killall program -# -killall() -{ - # NB: ps ax should give an error on System V, so we try it first! - pid="`ps ax 2>/dev/null | $AWK \"\ - /[\/ (]$2[ )]/ {print \\$1;} - /[\/ ]$2\$/ {print \\$1;}\"`" - test "$pid" || - pid="`ps -e 2>/dev/null | $AWK \"/ $2[ ]*\$/ {print \\$1;}\"`" - test "$pid" && kill $1 $pid; return -} +# The echo return value for success (defined in /etc/rc.config). +return=$rc_done case $1 in -'start') +start) if $IS_ON fax && test -x $FAXQ; then - if test $FAXQ_SERVER = yes ; then - killall -15 faxq - fi - if test $HFAXD_SERVER = yes ; then - killall -15 hfaxd - fi - printf "HylaFAX:" - if test $FAXQ_SERVER = yes ; then - $FAXQ; printf " faxq" - fi - if test $HFAXD_SERVER = yes ; then - HFAXD="$HFAXD -i $FAXPORT" - HFAXMSG=" hfaxd" - if [ $HFAXD_OLD_PROTOCOL = yes ]; then - HFAXD="$HFAXD -o 4557" - HFAXMSG="$HFAXMSG (with old protocol" - else - HFAXMSG="$HFAXMSG (without old protocol" - fi - if [ $HFAXD_SNPP_SERVER = yes ]; then - HFAXD="$HFAXD -s $SNPPPORT" - HFAXMSG="$HFAXMSG & with SNPP support)" - else - HFAXMSG="$HFAXMSG & without SNPP support)" - fi - $HFAXD ; printf "$HFAXMSG" - fi - if test $FAXQ_SERVER != yes && test $HFAXD_SERVER != yes ; then - printf " not started (script disabled by configure)" - fi - $ECHO "." + echo -n "Starting service HylaFAX" + killall -15 $FAXQ >/dev/null 2>&1 + killall -15 $HFAXD >/dev/null 2>&1 + /sbin/startproc $FAXQ || return=$rc_failed + /sbin/startproc $HFAXD -i $FAXPORT -o 4557 -s $SNPPPORT \ + || return=$rc_failed + echo -e "$return" fi ;; -'stop') - $ECHO "Stopping HylaFAX Servers." +stop) + echo -n "Shutting down service HylaFAX" + $FAXQUIT >/dev/null 2>&1 - killall -15 hfaxd - ;; -'start_msg') - $ECHO "Starting HylaFAX Servers." - ;; -'stop_msg') - $ECHO "Stopping HylaFAX Servers." + /sbin/killproc -TERM $HFAXD || return=$rc_failed + + echo -e "$return" ;; +restart|force-reload) + ## If first returns OK call the second, if first or + ## second command fails, set echo return value. + $0 stop && $0 start || return=$rc_failed + ;; +reload) + $0 stop && $0 start || return=$rc_failed + ;; +status) + echo -n "Checking for service HylaFAX: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + echo -n "HylaFAX queue manager process: " + /sbin/checkproc $FAXQ + rc_status -v + echo -n "HylaFAX client-server protocol server: " + /sbin/checkproc $HFAXD + rc_status -v + ;; *) - $ECHO "usage: hylafax {start|stop|start_msg|stop_msg}" + echo "usage: /etc/init.d/hylafax {start|stop|status|restart|reload}" ;; esac + +rc_exit + Index: hylafax-4.4.4/etc/probemodem.sh.in =================================================================== --- hylafax-4.4.4.orig/etc/probemodem.sh.in +++ hylafax-4.4.4/etc/probemodem.sh.in @@ -128,6 +128,7 @@ done # Lock the device for later use when deducing the modem type. # JUNK="$LOCKX $OUT" +trap "@RM@ -f $JUNK; @RM@ -fr $TMPDIR; exit 0" 0 trap "@RM@ -f $JUNK; @RM@ -fr $TMPDIR; exit 1" 1 2 15 LOCKSTR=`expr " $$" : '.*\(..........\)'` @@ -207,7 +208,7 @@ SendToModem() sleep 1 # wait for previous kill case $TARGET in *-linux*) ;; - *) onDev $STTY 0; sleep 1 ;; # reset the modem (hopefully) + *) onDev $STTY -clocal; sleep 1 ;; # reset the modem (hopefully) esac # start listening for output onDev -c "$STTY clocal && exec $CAT $tdev"; sleep 2 @@ -265,12 +266,13 @@ while [ -z "$RESULT" ]; do # reset the modem. If something goes wrong, it'll # nag the user to check on the problem. # - (trap "exit 1" 1 2 15; + (trap "exit 1" 1 2; while true; do sleep 10; echo "" echo "Hmm, something seems to be hung, check your modem eh?" done)& nagpid=$! + trap "@RM@ -f \$JUNK; @RM@ -fr $TMPDIR; kill $nagpid \$catpid; exit 0" 0 trap "@RM@ -f \$JUNK; @RM@ -fr $TMPDIR; kill $nagpid \$catpid; exit 1" 1 2 15 if [ x"$ATCMD" != x"" ]; then @@ -284,6 +286,7 @@ while [ -z "$RESULT" ]; do wait $nagpid # Really waits its end exec 2>&3 3>&- # Restore stderr + trap "@RM@ -f \$JUNK; @RM@ -fr $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 0" 0 trap "@RM@ -f \$JUNK; @RM@ -fr $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 1 2 15 sleep 1 Index: hylafax-4.4.4/man/faxrcvd.1m =================================================================== --- hylafax-4.4.4.orig/man/faxrcvd.1m +++ hylafax-4.4.4/man/faxrcvd.1m @@ -75,7 +75,7 @@ the value of various identification indi .SH NOTES This script can route facsimile directly to the intended recipient. To do this create a shell script -.B etc/FaxDispatch +.B bin/FaxDispatch in the spooling area that sets .I SENDTO to the receiver's electronic mail address. For example, Index: hylafax-4.4.4/port/install.sh.in =================================================================== --- hylafax-4.4.4.orig/port/install.sh.in +++ hylafax-4.4.4/port/install.sh.in @@ -210,7 +210,7 @@ install() do_chXXX $CHGRP $target fi $VERBOSE "$CHMOD $target" - do_chXXX $CHMOD $target + $CHMOD $target if [ $STRIP != ":" ] && [ -x $ROOT$DESTDIR$f ]; then $STRIP $target >/dev/null 2>&1 || true $VERBOSE "$STRIP $target" Index: hylafax-4.4.4/util/Sys.h =================================================================== --- hylafax-4.4.4.orig/util/Sys.h +++ hylafax-4.4.4/util/Sys.h @@ -40,10 +40,6 @@ #include "port.h" // for anything not in system includes -#if HAS_OSFCN_H -#include <osfcn.h> -#endif - /* * Wrapper functions for C library calls. * Index: hylafax-4.4.4/util/faxcron.sh.in =================================================================== --- hylafax-4.4.4.orig/util/faxcron.sh.in +++ hylafax-4.4.4/util/faxcron.sh.in @@ -37,9 +37,11 @@ # 4. Notify about sites that currently have jobs rejected. # +/usr/sbin/rchylafax status &>/dev/null || exit 0 + AGEINFO=30 # purge remote info after 30 days inactivity AGELOG=30 # keep log info for last 30 days -AGERCV=7 # purge received facsimile after 7 days +AGERCV=9999 # purge received facsimile after 9999 days AGETMP=1 # purge orphaned temp files after 1 day FAXUSER=@FAXUID@ # owner of log files LOGMODE=0644 # mode for log files Index: hylafax-4.4.4/util/typerules =================================================================== --- hylafax-4.4.4.orig/util/typerules +++ hylafax-4.4.4/util/typerules @@ -135,8 +135,7 @@ 0 string WNGZWZSS error Wingz spreadsheet support not configured 0 string #Inventor V error IRIS Inventor file support not configured >15 string binary error binary IRIS Inventor file support not configured ->15 string ascii ps %F/textfmt -B -f Courier-Bold\ - -Ml=0.4in -p 11 -s %s >%o <%i +>15 string ascii ps %F/a2pswrap %s %o %i # 0 string \x89PNG error PNG support not configured 0 short 0xffd8 error filetype conversion support not configured @@ -174,5 +173,4 @@ # Support 7-bit text which would otherwise be seen as binary. # -#0 byte x ps %F/textfmt -B -f Courier-Bold \ -# -p 11 -s %s >%o <%i +0 ascii x ps %F/a2pswrap %s %o %i
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor