Re: CentOS/RHEL daemon settings.

From: Lance Levsen <lance_at_no.spam.please>
Date: Fri Jun 30 2006 - 18:06:35 CST

Steven Kurylo wrote:

>> update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .
>
> No, thats how you set and remove runlevels. Programs should have a
> file in /etc/default/ where you set the start on boot flag.
>
> $ cat /etc/default/apache2
> # 0 = start on boot; 1 = don't start on boot
> NO_START=1
>
> $ cat /etc/default/openvpn
> # This is the configuration file for /etc/init.d/openvpn
> # Start only these VPNs automatically via init script.
> # Allowed values are "all", "none" or space separated list of
> # names of the VPNs. If empty, "all" is assumed.
> #
> #AUTOSTART="all"
> AUTOSTART="none"
>
> Too bad they're not consistent. :-)

I'm not sure you're correct here, or we're talking about two different
things.

The scripts in /etc/default/ are generally included from the
/etc/init.d/ script. They set command line switches or as you show
determine whether to continue or exit, or run in daemon vs. cron, etc.

The question, as I read it, was how the /etc/rc#.d/ files are set (as
chkconfig does in RH based distros) if so, then update-rc.d is the
correct correlation to that.

Am I mistaken or are we talking about different things?

The way I see it, if I write a startup script (say setting up an SSH
tunnel, or starting Oracle) and put it in init.d just creating a
/etc/default/ file won't set it to start in runlevel two. Running
update-rc.d on it will though as it will create the correct symlnks in
/etc/rc2.d/

Cheers,
lance

-- 
Lance Levsen,
Catprint Computing
Tel:  (306) 493-2249
Cell: (306) 230-8783
Blog: http://www.catprint.ca/blog/
SaskBlogs: http://saskblogs.catprint.ca/

Received on Fri Jun 30 18:07:13 2006

This archive was generated by hypermail 2.1.8 : Fri Sep 08 2006 - 23:26:38 CST