Re: A question about starting daemons .......

From: championsleeper (strepxe_at_yahoo.co.uk)
Date: 10/30/03


Date: 30 Oct 2003 14:44:09 -0800


>From this [and another reply] it appears that there are three methods
to to start daemons:

(a) by creating a file in /sbin/init.d and linking it to one of the
rc.x directories as a Sxxx file,
(b) creating an entry for the daemon in /etc/inetd.conf or
(c) starting it by listing it in /etc/inittab

Method (a) is for standalone daemons or programs that are intended to
run at specific runlevels. The method will start one daemon at
runlevel activation. The /sbin/init.d scripts are for starting
programs that may not use a network connection, such as accounting or
cron; or need to maintain a state between network connections, such as
ntp and ssh.

Method (b) is for daemons that have to be activated by network users
connecting to your server. This method will start a daemon for each
net user request as long as inetd is active. Consequently you can have
multiple instances of the same daemon. Many of what look like options
in inetd.conf are there to make sure that inetd itself opens the
network socket the same way that the daemon would if you started it
manually or out of /sbin/init.d. Inetd is really for starting services
that will only offer their service to a network connection. There are
a lot of these kinds of services with some intended for use by
multiple simultaneous clients. To manage this type of service
behaviour, the BSD people invented inetd as a way to minimize the
number of processes in a "wait for a network connection" state.

(c) This is the best place for daemons that need to be automatically
restarted if they happen to die. It's less common than /sbin/init.d
(which is itself started out by /etc/inittab).



Relevant Pages

  • Re: A service that can be forced to fail
    ... "Marco Shaw" wrote: ... | that's listening for a network connection. ... Perhaps the daemon should be ...
    (microsoft.public.windows.server.general)
  • Re: What should happen when a remote session is unceremoniously killed
    ... interrupt that a device driver has to handle) generated when the modem hangs ... Why would you expect a network connection to generate a hardware event? ... the telnet daemon has a port open. ...
    (comp.unix.programmer)
  • RE: starting daemons at server start
    ... This didn't work on restarting just now, ... I don't know if the script is ... changed the script from another daemon. ... > from inetd, then after the ...
    (freebsd-questions)
  • Re: inetd vs standalone daemon
    ... With inetd, you can also turn regular filters into network ... Because the big daemon needs to find out which service ... would it forkthe configured program to handle the connection. ...
    (freebsd-questions)
  • Re: How secure is inetd nowadays?
    ... just installed Leafnode, having found Cnews way too abstruse and INN ... Leafnode will not run as a standalone daemon, ... reinstall inetd. ... Both inetd and xinetd watch the incoming ...
    (comp.os.linux.security)