Subject: Re: pkg/18681: comms/hylafax 'faxd' started unconditionally
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-bugs
Date: 10/17/2002 09:11:15
On Thu, 17 Oct 2002, Hauke Fath wrote:

> 	The '/etc/rc.d/hylafax' script starts 'hfaxd' unconditionally,
> 	blocking the inetd option.

I think instead of checking for inetd.conf setting for it, the
rc.d/hylafax script should be fixed to use the proper rc.d file syntax.
Then it would not run automatically unless "hylafax=yes" was set in
rc.conf.

Maybe like:

. /etc/rc.subr

name="hylafax"
procname="hfaxd"
rcvar=$name
command="@PREFIX@/libexec/hfaxd"
pidfile="/var/run/hfaxd.pid"
required_files="/var/spool/${name}/etc/config"

load_rc_config $name
run_rc_command "$1"

(Not tested. Also, could use "hfaxd" as name instead. Also, since it
could be used on non-NetBSD systems maybe this could be made to check for
/etc/rc.subr like the apache and cupsd commands do.)

Then if you want inetd then use inetd.conf and don't set "hylafax=yes".

(By the way, /var/spool/hylafax/etc/config seems like a strange, non-pkg
file location.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/