[CentOS] quickly setting /etc/rc levels

Wed Apr 11 22:43:52 UTC 2012
aurfalien <aurfalien at gmail.com>

On Apr 11, 2012, at 11:48 AM, Bowie Bailey wrote:

> On 4/11/2012 11:34 AM, John Doe wrote:
>> From: aurfalien <aurfalien at gmail.com>
>> 
>>> I vaguely recall being able to auto set various /etc/rc levels based on 
>>> /etc/init.d/scriptname.
>>> I am about to create the sym links by hand but wondering if any one has a 
>>> shortcut to auto set the links?
>> chkconfig?
> 
> And the init scripts can have a header in them giving the default
> settings for chkconfig.  It looks like this:
> 
> # chkconfig: 2345 55 25
> 
> This line (taken from sshd) says that this service should run in run
> levels 2, 3, 4, and 5 with a start priority of 55 and a stop priority of 25.
> 
> If the service doesn't have any links in the rc*.d directories yet,
> 'chkconfig --add svcname' will create the start and stop links based on
> the chkconfig line in the script file.

Yep that did it, thanks man, much appreciated, got tired of doing the links by hand.

- aurf