auto-starting daemons on startup

Matthew 'Fringe' Duhan yellowdog-general@lists.terrasoftsolutions.com
Tue May 21 14:32:01 2002


On Tue, 21 May 2002, Stefan Jeglinski wrote:
>As an example, I'd like to add proftpd to the startup. I have a
>script /etc/init.d/proftp that works fine for startup and shutdown
>from the command line. So in rc3.d (I boot in runlevel 3), I added:
>
>S92proftp -> ../init.d/proftp
>
>I suppose this is all well and good. BTW, I run proftp in standalone
>mode, no [x]inet.
>
>Now, if I run ntsysv, proftp does not show up at all. Also:
>
>root@orion rc3.d]# chkconfig --list proftp
>service proftp does not support chkconfig
>
>I'm curious why these observations are as they are. As an experiment,
>I changed S55sshd to S93sshd, but running ntsysv caused it to be
>changed back to S55. What directory does ntsysv/chkconfig parse to
>get its information? And to where does it write after changes have
>been made (besides rc#.d)? It almost seems like there is a common set
>of daemons that can be started/stopped with ntsysv/chkconfig, to the
>exclusion of all others (?)
>
>From man chkconfig:
RUNLEVEL FILES
       Each service which should be manageable by chkconfig needs
       two or more commented lines added to  its  init.d  script.
       The  first line tells chkconfig what runlevels the service
       should be started in by default, as well as the start  and
       stop  priority  levels.  If  the  service  should  not, by
       default, be started in any runlevels, a - should  be  used
       in  place of the runlevels list.  The second line contains
       a description for the service, and may be extended  across
       multiple lines with backslash continuation.

       For example, random.init has these three lines:
       # chkconfig: 2345 20 80
       # description: Saves and restores system entropy pool for \
       #              higher quality random number generation.
       This says that the random script should be started in lev
       els 2, 3, 4, and 5, that its start priority should be  20,
       and  that  its  stop priority should be 80.  You should be
       able to figure out what the description says; the \ causes
       the line to be continued.  The extra space in front of the
       line is ignored.

Therefore, check the first two lines of /etc/rc.d/init.d/sshd. I'm guessing
that it lists the priority as 55, which is why ntsysv/chkconfig changed it
back.
On a side note, I prefer pure-ftpd over proftpd, you may want to give it a
try. Also, it's recommended that you run it through xinetd.

Hope this helps,
Matt
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Matthew Duhan         fringe@shore.net          http://www.fringenet.net
When I want my opinions I'll ask me for them.
WWW, HTML, VR, MOO, HRSFA, TMBG, DNA--any more initials and I'll go insane
Hey, cool! They have a blimp!           -- The TICK