On 15 Jan 2005, Debian Bug Tracking System wrote:
> dictd may be run from inetd

Excellent.  It looks obvious according to the documentation, I don't
understand why I haven't seen it before submitting the bug.  Was it
documented a long time ago?

Quoting from README.inetd.gz:

>  1.  The dictd daemon must not be running.  As root, running
> `invoke-rc.d dictd stop' will stop the daemon.  Inserting `exit 0'
> near the top of /etc/init.d/dictd will prevent it from starting on
> bootup.  If you have installed the file-rc package, the same result
> may be achieved by editing /etc/runlevel.conf.

It would be nice if the initscript could check if dictd is supposed to
run from inetd or not with something like (inspirated from
init.d/exim4):

# Exit if dictd runs from /etc/inetd.conf
if [ -f /etc/inetd.conf ] && grep -E -q "^ *([0-9.]+:)?dict" /etc/inetd.conf
then
  exit 0
fi

It would ease the procedure.

> 2.  The following line must be inserted in /etc/inetd.conf:

> dict      stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/dictd -i

It would also be nice to add that line to inetd.conf as a comment in
order to the ease the process.

> If there is any access specification present, the following line
> must be present [in dictd.conf] to allow access by inetd:
>           allow inetd

Same issue, please add this line as a comment to dictd.conf

> Although, due to its rather large startup time, this daemon was not
> intended to run from inetd, with a fast processor it is feasible to
> do so.

With inetd support:

[EMAIL PROTECTED]:~$ time dict foo > /dev/null

real    0m0.103s
user    0m0.005s
sys     0m0.014s

It's quite OK if you consider that I'm running a 3 year old machine
(PIV 1.2GHz).

> Let me know if you have any problems.

No problem, thanks.
-- 
Cyril Bouthors

Attachment: pgpCzvmRUFZ59.pgp
Description: PGP signature

Reply via email to