From the man pages, chkconfig is defined to provide a simple command-line tool for maintaing the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories.
When chkconfig is run without any options, it displays usage information. If only a service name is given, as in the case above, it checks to see if the service is configured to be started in the current runlevel. If it is, chkconfig returns true; otherwise it returns false. The –level option may be used to have chkconfig query an alternative runlevel rather than the current one. If the service should not, by default, be started in any runlevels, a – should be used in lace of the runlevels list.
Available run levels:
0. System halt [ DO NOT USE! ]
1. Single-user mode
2. Multiuser, without NFS
3. Complete multiuser mode
4. User defined [ RARELY USED ]
5. X11 (XDM login)
6. Reboot [ DO NOT USE! ]
To verify the chkconfig runlevels for vsftpd
chkconfig --list | grep vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Suppose we wanted vsftpd to run at startup.
chkconfig --levels 2345 vsftpd on
This code will specify the run level, overriding the runlevels found in the /etc/rc.d/init.d/vsftpd file.
chkconfig vsftpd on
The code above will look for the runlevels listed in the /etc/rc.d/init.d/vsftpd file.
# chkconfig: 2345 80 30
These runlevels are listed in the chkconfig lines. In this example, sendmail will run at levels 2, 3, 4, and 5 and will be activated with a priority 80 and deactivated with priority 30.
To verify the chkconfig runlevels for vsftpd
chkconfig --list | grep vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Source(s)
http://josephcolton.com/linuxguide/book/node132.html
http://www.linuxjournal.com/article/4445
http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/boot.html
man chkconfig
http://linuxshellaccount.blogspot.com/2008/06/using-chkconfig-to-manage-linux-service.html