Package: hylafax-server
Version: 2:4.3.1-7
Severity: minor
Tags: patch

The startup script knows that hfaxd may be started from inetd, but
doesn't start faxq in this case. Here's a patch:

Regards,
Christopher



-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-6-vserver-amd64
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages hylafax-server depends on:
ii  adduser          3.102                   Add and remove users and groups
ii  debconf [debconf 1.5.11etch1             Debian configuration management sy
ii  gs-esp [gs]      8.15.3.dfsg.1-1etch1    The Ghostscript PostScript interpr
ii  hylafax-client   2:4.3.1-7               Flexible client/server fax softwar
ii  libc6            2.3.6.ds1-13etch5       GNU C Library: Shared libraries
ii  libgcc1          1:4.1.1-21              GCC support library
ii  libpam0g         0.79-5                  Pluggable Authentication Modules l
ii  libstdc++6       4.1.1-21                The GNU Standard C++ Library v3
ii  libtiff-tools    3.8.2-7                 TIFF manipulation and conversion t
ii  libtiff4         3.8.2-7                 Tag Image File Format (TIFF) libra
ii  lsb-base         3.1-23.2etch1           Linux Standard Base 3.1 init scrip
ii  mailx            1:8.1.2-0.20050715cvs-1 A simple mail user agent
ii  metamail         2.7-52                  implementation of MIME
ii  psmisc           22.3-1                  Utilities that use the proc filesy
ii  sed              4.1.5-1                 The GNU sed stream editor
ii  sharutils        1:4.2.1-15              shar, unshar, uuencode, uudecode
ii  zlib1g           1:1.2.3-13              compression library - runtime

Versions of packages hylafax-server recommends:
ii  metamail                      2.7-52     implementation of MIME

-- debconf information excluded
--- old/hylafax.old     2008-03-14 13:50:43.000000000 +0100
+++ init.d/hylafax      2008-03-14 14:12:41.000000000 +0100
@@ -57,12 +57,18 @@
   exit 1
 fi
 
-if [ -z "$OLDPROT$NEWPROT$SNPP" ]
+if [ -z "$OLDPROT$NEWPROT$SNPP" -a "$1" != "stop" ]
 then
-  echo "You must specify at least one protocol OLD, NEW or SNPP in"
-  echo "/etc/hylafax/setup.cache using the command faxsetup,"
-  echo "otherwise you might only run hylafax via inetd."
-  exit 1
+  if grep hylafax /etc/inetd.conf >/dev/null || grep hylafax /etc/xinetd.d/* 
>/dev/null
+  then
+    #echo "hfaxd runs from inetd"
+    true
+  else
+    echo "You must specify at least one protocol OLD, NEW or SNPP in"
+    echo "/etc/hylafax/setup.cache using the command faxsetup,"
+    echo "otherwise you might only run hylafax via inetd."
+    exit 1
+  fi
 fi
 
 if [ -r /etc/default/hylafax ]; then
@@ -237,8 +243,11 @@
       log_daemon_msg "Starting HylaFAX" faxq
       start-stop-daemon --start --exec /usr/sbin/faxq
 
-      log_progress_msg "hfaxd"
-      start-stop-daemon --start --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT 
$OLDPROT $SNPP
+      if [ -n "$OLDPROT$NEWPROT$SNPP" ]
+      then
+        log_progress_msg "hfaxd"
+        start-stop-daemon --start --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT 
$OLDPROT $SNPP
+      fi
 
       cd ${HYLAFAX_HOME}/etc
       devices="`echo_fax_devices`"

Reply via email to