need clarity on chkconfig command

usa ims asked:

I installed a program called nss-pam-ldapd.x86_64 which installs a service called
nslcd. ‘nslcd’ will not start after a reboot.

When I do chkconfig –list nslcd, I get:

nslcd           0:off   1:off   2:on    3:off   4:off   5:off   6:off

As you can see, it’s set to start at runlevel 2. I went over to

/etc/rc.d/rc2.d

and I see a script:

S12nslcd -> ../init.d/nslcd

From the docs, I know that S files are for starting and k files are for killing.

I did a head on that file:

!/bin/sh
#
# chkconfig: - 12 88 
# description: Provides naming services using a directory server.
# processname: /usr/sbin/nslcd
# config: /etc/nslcd.conf
# pidfile: /var/run/nslcd/nslcd.pid


### BEGIN INIT INFO
# Provides: nslcd
# Required-Start: $network
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: naming services LDAP client daemon
# Description: Provides naming services using a directory server.
### END INIT INFO

In the rc3.d directory I see:

K88nslcd -> ../init.d/nslcd

Ok, like I said ‘k’ files are to kill the program.

I opened the file:

#!/bin/sh
#
# chkconfig: - 12 88 
# description: Provides naming services using a directory server.
# processname: /usr/sbin/nslcd
# config: /etc/nslcd.conf
# pidfile: /var/run/nslcd/nslcd.pid
#

### BEGIN INIT INFO
# Provides: nslcd
# Required-Start: $network
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: naming services LDAP client daemon
# Description: Provides naming services using a directory server.
### END INIT INFO

Why isn’t my nslcd service not starting up boot up?

My answer:


Because you’re booting into runlevel 3, not runlevel 2.

If you want to start the service at boot, enable it:

chkconfig nslcd on

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.