1CHKCONFIG(8)                System Manager's Manual               CHKCONFIG(8)
2
3
4

NAME

6       chkconfig  -  updates  and queries runlevel information for system ser‐
7       vices
8
9

SYNOPSIS

11       chkconfig --list [name]
12       chkconfig --add name
13       chkconfig --del name
14       chkconfig --override name
15       chkconfig [--level levels] name <on|off|reset|resetpriorities>
16       chkconfig [--level levels] name
17
18

DESCRIPTION

20       chkconfig provides a  simple  command-line  tool  for  maintaining  the
21       /etc/rc[0-6].d  directory  hierarchy by relieving system administrators
22       of the task of directly manipulating the  numerous  symbolic  links  in
23       those directories.
24
25       This  implementation of chkconfig was inspired by the chkconfig command
26       present in the IRIX operating system. Rather than maintaining  configu‐
27       ration  information  outside  of the /etc/rc[0-6].d hierarchy, however,
28       this version directly manages  the  symlinks  in  /etc/rc[0-6].d.  This
29       leaves  all  of  the  configuration information regarding what services
30       init starts in a single location.
31
32       chkconfig has five distinct functions: adding new services for  manage‐
33       ment,  removing  services  from management, listing the current startup
34       information for services, changing the  startup  information  for  ser‐
35       vices, and checking the startup state of a particular service.
36
37       When  chkconfig  is run without any options, it displays usage informa‐
38       tion.  If only a service name is given, it checks to see if the service
39       is  configured to be started in the current runlevel. If it is, chkcon‐
40       fig returns true; otherwise it returns false. The --level option may be
41       used  to  have  chkconfig query an alternative runlevel rather than the
42       current one.
43
44       If one of on, off, reset, or resetpriorities  is  specified  after  the
45       service  name, chkconfig changes the startup information for the speci‐
46       fied service.  The on and off flags cause the service to be started  or
47       stopped,  respectively,  in the runlevels being changed. The reset flag
48       resets the on/off state for all runlevels for the service  to  whatever
49       is  specified in the init script in question, while the resetpriorities
50       flag resets the start/stop priorities for the service  to  whatever  is
51       specifed in the init script.
52
53       By  default,  the on and off options affect only runlevels 2, 3, 4, and
54       5, while reset and resetpriorities affects all of the  runlevels.   The
55       --level option may be used to specify which runlevels are affected.
56
57       Note that for every service, each runlevel has either a start script or
58       a stop script.  When switching runlevels, init  will  not  re-start  an
59       already-started  service,  and  will  not re-stop a service that is not
60       running.
61
62       chkconfig also can manage xinetd scripts via the means of xinetd.d con‐
63       figuration  files.  Note that only the on, off, and --list commands are
64       supported for xinetd.d services.
65
66

OPTIONS

68       --level levels
69              Specifies the run levels an operation should pertain to.  It  is
70              given  as  a string of numbers from 0 to 7. For example, --level
71              35 specifies runlevels 3 and 5.
72
73
74       --add name
75
76              This option adds a new  service  for  management  by  chkconfig.
77              When  a new service is added, chkconfig ensures that the service
78              has either a start or a kill entry in  every  runlevel.  If  any
79              runlevel  is missing such an entry, chkconfig creates the appro‐
80              priate entry as specified by the  default  values  in  the  init
81              script.  Note  that default entries in LSB-delimited 'INIT INFO'
82              sections take precedence  over  the  default  runlevels  in  the
83              initscript.
84
85
86       --del name
87              The  service  is removed from chkconfig management, and any sym‐
88              bolic links in /etc/rc[0-6].d which pertain to it are removed.
89
90              Note that future package installs for this service may run  chk‐
91              config  --add,  which  will re-add such links. To disable a ser‐
92              vice, run chkconfig name off.
93
94
95       --override name
96              If service name is configured exactly as  it  would  be  if  the
97              --add  option  had  been  specified  with  no  override  file in
98              /etc/chkconfig.d/name, and if /etc/chkconfig.d/name  now  exists
99              and  is  specified  differently from the base initscript, change
100              the configuration for  service  name  to  follow  the  overrides
101              instead of the base configuration.
102
103
104       --list name
105              This  option  lists  all  of  the services which chkconfig knows
106              about, and whether they are stopped or started in each runlevel.
107              If  name is specified, information in only display about service
108              name.
109
110

RUNLEVEL FILES

112       Each service which should be manageable by chkconfig needs two or  more
113       commented  lines  added to its init.d script. The first line tells chk‐
114       config what runlevels the service should be started in by  default,  as
115       well  as the start and stop priority levels. If the service should not,
116       by default, be started in any runlevels, a - should be used in place of
117       the  runlevels  list.   The  second line contains a description for the
118       service, and may be extended across multiple lines with backslash  con‐
119       tinuation.
120
121       For example, random.init has these three lines:
122       # chkconfig: 2345 20 80
123       # description: Saves and restores system entropy pool for \
124       #              higher quality random number generation.
125       This  says  that the random script should be started in levels 2, 3, 4,
126       and 5, that its start priority should be 20, and that its stop priority
127       should  be  80.   You should be able to figure out what the description
128       says; the \ causes the line to be continued.  The extra space in  front
129       of the line is ignored.
130
131

OVERRIDE FILES

133       File in /etc/chkconfig.d/servicename are parsed using the same comments
134       that chkconfig notices in init service scripts, and override values  in
135       the init service scripts themselves.
136
137

SEE ALSO

139       init(8) ntsysv(8) system-config-services(8)
140
141

AUTHOR

143       Erik Troan <ewt@redhat.com>
144
145
146
1474th Berkeley Distribution       Wed Oct 8 1997                    CHKCONFIG(8)
Impressum