File chkconfig.8 of Package insserv-compat

.\"
.\" SuSE man page for chkconfig
.\" Copyright (c) 2003-2006 SuSE Linux AG, Nuernberg, Germany.
.\" please send bugfixes or comments to http://www.suse.de/feedback.
.\"
.\" Author: Michael Schroeder <mls@suse.de>
.\"
.TH CHKCONFIG 8 "Oct 2006"
.SH NAME
chkconfig \- enable or disable system services

.SH SYNOPSIS
.B chkconfig
.B -t|--terse
.RI [ names ]
.br
.B chkconfig
.B -s|--set
.RI [ name
.IR state ]
.br
.B chkconfig
.B -e|--edit
.RI [ names ]
.br
.B chkconfig
.B -c|--check
.I name
.RI [ state ]
.br
.B chkconfig
.B -l|--list
.RB [ --deps ]
.RI [ names ]
.br
.B chkconfig
.B -A|--allservices
.br
.B chkconfig
.B -a|--add
.RI [ names ]
.br
.B chkconfig
.B -d|--del
.RI [ names ]

.SH DESCRIPTION
chkconfig is used to manipulate the runlevel links at boot time
(see
.IR init.d (7)).
It can be thought of as a frontend to
.IR insserv (8).
Chkconfig can run in six different modes: terse list mode, set mode,
edit mode, list mode, add mode and delete mode. The last three modes
were added for compatiblity reasons.
.SH TERSE LIST MODE
This mode lists the state of the specified services, or all known
services if no service name was provided. Every printed line
consists of the name of the service and the runlevels the
service is configured for at the moment. If it is configured in
no runlevel,
.B off
is used instead, if it is configured in the runlevels defined
as a default by the start script,
.B on
is used. If the service is an enabled inetd or xinetd service,
.B inetd
and
.B xinetd
are used. Inetd/xinetd services are configured in
.I /etc/inetd.d
and
.IR /etc/xinetd.d ,
respectively. You can use the 
.B -A
or
.B --allservices
parameter to get all services (even the boot.*-services) listed.
.PP
If chkconfig is called without arguments, all services are listed
in terse mode.
.SH SET MODE
Set mode is used to configure at which runlevel a service should
be started. The arguments must be specified as pairs of
service name and new state. You can use
.B on
and
.B off
as special states to select the default set of runlevels or to disable
a service completely. You can use
.B inetd
or
.B xinetd
to configure a service managed by the inetd/xinetd daemons.
.PP
Insserv can calculate dependencies for only one service at the same
time. To work around this limitation imposed by insserv, chkconfig
uses the '-f' option of insserv when it reads the list of services from
standard input. Note that --force switches off all dependency checks
and could lead to depending services no longer working, use with care.
.PP
If no services are specified, chkconfig reads lines from standard
input. Each line must consist of a service/state pair. As this is
exactly the output of the terse list mode, this can be used to
reconfigure a service specification saved by a former run.

If the option
.B -f
or
.B --force
is also given, insserv is called with a '-f' option.
.SH EDIT MODE
This mode is a combination of the terse list mode and set mode.
It writes the state of all specified services (or all known
services, if no service was provided) into a temporary file,
starts an editor and re-configures all services to reflect the
states of the changed temporary file.
.SH CHECK MODE
This mode can be used to check the state of a service.
chkconfig exits with a return code of '0' if the service is enabled
in all of the specified runlevels, otherwise the exit status
is '1'. If chkconfig is called with only a service name the
current runlevel of the system is used for checking.
.SH LIST MODE
List mode prints for each specified service a line that consists
of the service name and for runlevels zero to six
.B on
or
.B off
depending if the service will be started or not.
.B on
will be printed in bright green if the output is written to a
terminal. If the
.B --deps
option is given, the names of the services that must be started
before this service is appended to each line. The inetd/xinetd
services are listed in extra sections. 

You can use the
.B -A
or
.B --allservices
parameter to get all services (even the boot.*-services) listed.
.SH ADD MODE
Calls insserv
to enable a service and uses list mode to display the new
setting afterwards.
.SH DEL MODE
Same as add mode, but disable the service.
.SH OTHER OPTIONS
When no service names are given on the command line, chkconfig
defaults to all known services excluding those
that are not enabled in runlevels 1 to 6 and start with 
.RB ' boot. '.
Use the
.B --allservices
or
.B -A
option if you want to see such services as well.
.SH EXAMPLES
.IP
chkconfig
.PP
list the runlevel configuration of all known services
.IP
chkconfig apache
.PP
list the runlevel configuration of the apache web server
.IP
chkconfig -t apache xntpd
.PP
list the runlevel configuration of the apache web server and
the network time protocol daemon.
.IP
chkconfig apache on
.PP
configure the apache web server to be started on next boot time.
.IP
chkconfig apache 5
.PP
configure the apache web server to be started only if the
system reaches runlevel 5.
.IP
chkconfig apache 35
.PP
configure the apache web server for runlevel 3 and 5.
.IP
chkconfig apache on xntpd off
.PP
configure two services
.IP
chkconfig finger xinetd
.PP
configure a xinetd service
.IP
chkconfig -A >~root/chkconfig.save
.PP
backup the current configuration
.IP
chkconfig -s <~root/chkconfig.save
.PP
restore the configuration
.IP
chkconfig -e apache xntpd
.PP
change the runlevel configuration interactively
.IP
chkconfig -e
.PP
change the runlevel configuration of all services interactively

.SH FILES
.IP /etc/init.d/
path to the boot script base directory as required by the Linux
Standard Base Specification (LSB).
.IP /etc/inetd.d/
path to the inetd services. See the inetd manpage to find out
how to enable this feature.
.IP /etc/xinetd.d/
path to the xinetd services.

.SH SEE ALSO
.BR init.d (7),
.BR init (7),
.BR inetd (8)
.BR xinetd (8)
.BR insserv (8)

.SH COPYRIGHT
2003 SuSE Linux AG, Nuernberg, Germany.

.SH AUTHOR
Michael Schroeder <mls@suse.de>
openSUSE Build Service is sponsored by