Subject: pkg/18681: comms/hylafax 'faxd' started unconditionally
To: None <gnats-bugs@gnats.netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 10/17/2002 17:15:23
>Number: 18681
>Category: pkg
>Synopsis: rc.d script does not allow starting hfaxd through inetd
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 17 08:42:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Hauke Fath <hauke@espresso.rhein-neckar.de>
>Release: NetBSD 1.6
>Organization:
Einzeln auftretender Radfahrer
>Environment:
System: NetBSD pizza.causeuse.org 1.6 NetBSD 1.6 (PIZZA) #1:
Wed Sep 11 23:26:21 CEST 2002
hauke@pizza.causeuse.org:/usr/src/sys/arch/sparc/compile/PIZZA sparc
Architecture: sparc
Machine: sparc
# $NetBSD: hylafax.sh,v 1.4 2002/09/20 02:01:55 grant Exp $
>Description:
The hylafax 'hfaxd' can be operated standalone, or from
inetd. The latter makes sense for a small site sending a few
faxes a day.
The '/etc/rc.d/hylafax' script starts 'hfaxd' unconditionally,
blocking the inetd option.
>How-To-Repeat:
Install comms/hylafax, then set up a hfaxd entry in
inetd.conf; wonder why it does not work.
>Fix:
Apply the equivalent of the following patch to see whether
hfaxd is started by inetd before starting it standalone:
--- /usr/pkg/etc/rc.d/hylafax Thu Oct 17 16:54:13 2002
+++ /etc/rc.d/hylafax Wed Jun 26 22:38:00 2002
@@ -10,9 +10,12 @@
case ${command} in
start)
if [ -x /usr/pkg/libexec/hfaxd -a -f /var/spool/hylafax/etc/config ] ; then
- echo -n 'Starting hfaxd'
- /usr/pkg/libexec/hfaxd -i 4559 -o 4557 -s 444
-
+ echo -n 'Starting'
+ # start hfaxd standalone if not run by inetd
+ if ! `egrep '^[^#]+hfaxd.+$' /etc/inetd.conf >/dev/null`; then
+ echo -n ' hfaxd'
+ /usr/pkg/libexec/hfaxd -i 4559 -o 4557 -s 444
+ fi
echo ' faxq.'
/usr/pkg/sbin/faxq
fi
>Release-Note:
>Audit-Trail:
>Unformatted: