2001-06-05 15:22:41 +04:00
|
|
|
.\" $NetBSD: chkconfig.8,v 1.3 2001/06/05 11:22:42 wiz Exp $
|
2001-03-14 06:51:46 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2001 Zembu Labs, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Author: Dan Mercer <dmercer@zembu.com>
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by Zembu Labs, Inc.
|
|
|
|
.\" 4. Neither the name of Zembu Labs nor the names of its employees may
|
|
|
|
.\" be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
|
|
|
|
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
|
|
|
|
.\" RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
|
|
|
|
.\" CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.Dd March 13, 2001
|
|
|
|
.Dt CHKCONFIG 8
|
2001-06-05 15:22:41 +04:00
|
|
|
.Os
|
2001-03-14 06:51:46 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm chkconfig
|
|
|
|
.Nd rc.conf.d management utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Ar service
|
|
|
|
.Nm ""
|
|
|
|
.Op Fl f
|
|
|
|
.Ar service
|
|
|
|
.Op Ar on | off
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility allows a system administrator to easily manage services
|
|
|
|
started by
|
|
|
|
.Xr rc 8 .
|
|
|
|
.Pp
|
|
|
|
With no arguments,
|
|
|
|
.Nm
|
|
|
|
will print the state (on or off) of every service found in the
|
|
|
|
directory
|
|
|
|
.Pa /etc/rc.conf.d/ .
|
|
|
|
The settings will be shown sorted according to the output of
|
|
|
|
.Xr rcorder 8 .
|
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Ar service
|
|
|
|
is specified as the sole argument,
|
|
|
|
.Nm
|
|
|
|
exits with status 0 if the service is
|
|
|
|
.Sq on
|
|
|
|
and status 1 if
|
|
|
|
.Sq off .
|
|
|
|
The exit status may be used by shell scripts to test the state of
|
|
|
|
a service, for example:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
if chkconfig wscons; then
|
|
|
|
echo "wscons is on"
|
|
|
|
else
|
|
|
|
echo "wscons is off"
|
|
|
|
fi
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The optional third argument allows the specified service to be set
|
|
|
|
to
|
|
|
|
.Sq on
|
|
|
|
or
|
|
|
|
.Sq off
|
|
|
|
for the next time its
|
|
|
|
.Xr rc.d 8
|
|
|
|
script is run (generally the next system reboot).
|
|
|
|
.Pp
|
|
|
|
In order for
|
|
|
|
.Nm
|
|
|
|
to display service status or to control service state, the service
|
|
|
|
must be managed by
|
|
|
|
.Nm "" .
|
|
|
|
A
|
|
|
|
.Nm
|
|
|
|
managed service is one that has the
|
|
|
|
.Xr rcorder 8
|
|
|
|
keyword
|
|
|
|
.Dq chkconfig
|
|
|
|
present in the
|
2001-04-03 15:19:54 +04:00
|
|
|
.Xr rc.d 8
|
2001-03-14 06:51:46 +03:00
|
|
|
script for that service. If a service's script does not contain
|
|
|
|
this keyword, it may still be managed by
|
|
|
|
.Nm
|
|
|
|
using the
|
|
|
|
.Fl f
|
|
|
|
flag. When this flag is used,
|
|
|
|
.Nm
|
|
|
|
will automatically add the
|
|
|
|
.Dq chkconfig
|
|
|
|
keyword to the service's script.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr rc 8 ,
|
|
|
|
.Xr rcorder 8
|
|
|
|
.Sh BUGS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program currently does not support configuring the options
|
|
|
|
to be passed to services upon startup.
|
|
|
|
.Sh AUTHOR
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program was written by
|
|
|
|
.An Dan Mercer
|
|
|
|
.Aq dmercer@zembu.com
|
|
|
|
of Zembu Labs, Inc.
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command first appeared in
|
|
|
|
.Nx 1.6 .
|