2 .\" Copyright 2000-2008 Werner Fink
3 .\" Copyright 2000-2003 SuSE GmbH Nuernberg, Germany
4 .\" Copyright 2007 SuSE Linux Products GmbH Nuernberg, Germany
5 .\" Copyright 2008 SuSE Linux Products GmbH Nuernberg, Germany
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 2 of the License, or
10 .\" (at your option) any later version.
13 .TH INSSERV 8 "Jul 29, 2008" "Version 1.11" "The SuSE boot concept"
17 .TH INSSERV 8 "Jul 29, 2008" "Version 1.11"
22 insserv \- Enable an installed system init script
31 .RI [[ / ] path/to/init.d/ ] script \ ...
38 .RI [[ / ] path/to/init.d/ ] script [ ,start=<lvl1> [ ,<lvl2>\ ... ]
40 .RI [[ / ] path/to/init.d/ ] script [ ,start=<lvl1> [ ,<lvl2>\ ... ] ,stop=<lvl1> [ ,<lvl2>\ ... ]]
50 .RI [[ / ] path/to/init.d/ ] script \ ...
56 .RB /usr/lib/lsb/install_initd
57 .RI [[ / ] path/to/init.d/script ]
59 .RB /usr/lib/lsb/remove_initd
60 .RI [[ / ] path/to/init.d/script ]
64 enables an installed system init script (`boot script')
65 by reading the comment header of the script, e.g.:
70 # Provides: boot_facility_1 [ boot_facility_2 ...]
71 # Required-Start: boot_facility_1 [ boot_facility_2 ...]
72 # Required-Stop: boot_facility_1 [ boot_facility_2 ...]
73 # Should-Start: boot_facility_1 [ boot_facility_2 ...]
74 # Should-Stop: boot_facility_1 [ boot_facility_2 ...]
75 # X-Start-Before: boot_facility_1 [ boot_facility_2 ...]
76 # X-Stop-After: boot_facility_1 [ boot_facility_2 ...]
77 # Default-Start: run_level_1 [ run_level_2 ...]
78 # Default-Stop: run_level_1 [ run_level_2 ...]
79 # Short-Description: single_line_description
80 # Description: multiline_description
85 and calculating the dependencies between all scripts.
89 are ignored in SuSE Linux, because the SuSE boot script concept
90 uses a differential link scheme (see
93 Please be aware that the line
97 # Required-Stop: boot_facility_1 [ boot_facility_2 ...]
101 declares facilities which must be available during shutdown of the service
104 tag. Same holds true for
108 # Should-Stop: boot_facility_1 [ boot_facility_2 ...]
112 which declares facilities which should be available during shutdown of
113 the service declared in the
115 tag. In both cases the script system should avoid stopping services
116 which are declared by these two Stop tags until the script including
117 these tags is stopped.
122 keyword implies that the script using this keyword
125 the specified service names.
128 keyword implies that the script using this keyword
131 the specified service names. Both implies that those
132 services now depend on the specifying script.
133 With known dependencies and runlevel(s)
135 sets and reorders the corresponding symbolic links
136 of the concerned runlevels
138 directories (see \fI init.d\fR (7)).
146 \fB0\fR\ used for System halt
147 \fB1\fR\ used for single user mode
148 \fB2\fR\ used for local multiuser without remote network
149 \fB3\fR\ used for full multiuser with network
150 \fB4\fR\ reserved for local use
151 \fB5\fR\ used for full multiuser with network and xdm
152 \fB6\fR\ used for System reboot
154 \fBS\fR\ used during boot into single user mode
155 \fBB\fR\ used during boot before any other runlevel
157 \fBS\fR\ used during boot before any other runlevel
166 in the configuration file
168 and each file in the directory
169 .IR /etc/insserv.conf.d/ .
170 Each line which begins with
172 and a following name defines a system facility
173 accordingly to the Linux Standard Base Specification (LSB),
174 All names followed by such a system facility
175 will declare the required dependencies of the facility.
176 Here is an example for
177 .IR /etc/insserv.conf :
181 # All local filesystems are mounted
182 # (done during boot phase)
185 # Low level networking
186 $network network route
188 # Named is operational
191 # All remote filesystems are mounted
192 # (in some cases /usr may be remote).
193 $remote_fs $local_fs nfs
195 # System logger is operational
198 # All network daemons are running
199 $netdaemons portmap inetd
201 # Services which need to be interactive
202 <interactive> boot.crypto
206 Names starting with a `+' sign are marked as optional.
207 If the service with the name after the plus sign is
208 available it will be used, if not available it is
209 ignored silently. Words beginning with
213 are keywords. Currently
215 is the only know keyword for marking a service
216 as an interactive one, e.g. a service which requires
217 a passphrase or password input during boot
222 in the configuration file
223 .IR /etc/insserv.conf ,
225 also knows the special facility
227 This facility indicates that a service should be inserted
228 at the end of all services. Clearly all services using
229 this facility will be grouped into one starting order.
232 Currently there exists nine options for
235 .BR \-v ,\ \-\-verbose
236 Write out what is currently going on.
238 .BR \-c\ <config> ,\ \-\-config\ <config>
239 Specify path to the insserv.conf file and the insserv.conf.d
240 directory. Useful for testing.
242 .BR \-o\ <path> ,\ \-\-override\ <path>
243 Path to replace existing LSB comment headers with the comment
244 headers found in this path (default path is
245 .IR /etc/insserv/overrides/ ).
247 .BR \-p\ <path> ,\ \-\-path\ <path>
248 Specify path to init.d directory. Useful for testing.
250 .BR \-n ,\ \-\-dryrun
251 Do not update symlinks.
253 .BR \-r ,\ \-\-remove
254 Remove the listed scripts from all runlevels.
256 .BR \-d ,\ \-\-default
257 Use default runlevels a defined in the scripts.
258 This may restore an edited runlevel link scheme.
261 Ignore if a required service is missed.
264 Print out short usage message.
266 But you may use the argument syntax described in the
270 .RI [[ / ] path/to/init.d/ ]
271 Relative or absolute path to the init scripts base directory.
273 For the SuSE Linux boot concept, this defaults to
278 in compliance with the LSB specification.
281 does not add or remove a script to the runlevels
282 declared in the script headers, but may re\-order the
283 runlevels if the order of the currently enabled scripts
284 has changed (see option
286 Note that if a relative path is used
288 has to be called from the root directory.
290 .RI [[ / ] path/to/init.d/ ] script\ ...
291 List of scripts which have to be added to
292 the runlevels. If a path is used it
293 should point to the absolute or relative
294 location of the boot scripts.
296 checks for the existence of these scripts.
297 For the runlevels the information found in
300 .RI [[ / ] path/to/init.d/ ] script [ ,start=<lvl1> [ ,<lvl2> ]]\ ...
301 List of scripts which have to be added to
302 the specified runlevels to be started with.
303 You may use this extension to override the default values
304 for start and stop runlevels of the script.
306 .BR <lvl1> ,\ <lvl2> ,\ ...
307 are the known runlevels explained above.
309 .IR ,stop=<lvl1> [ ,<lvl2> ]]
312 is possible but ignored on SuSE Linux.
317 .RI \fB\-r\fR\ [[ / ] path/to/init.d/ ] script\ ...
318 List of scripts which should be removed from
319 the runlevels. If a path is used it
320 should point to the absolute or relative
321 location of the boot scripts.
323 checks for the existence of these scripts.
326 Beside using the extensions
327 .IR ,start=<lvl1> [ ,<lvl2> ]]
329 .IR ,stop=<lvl1> [ ,<lvl2> ]]
330 it is possible to use override files replace a LSB comment header
331 or simple provide a missing LSB comment header. This can be done
332 by placing a file with the new LSB comment header using the same
333 name as the boot or init script in the directory
334 .IR /etc/insserv/overrides/ .
337 The exit codes have the following conditions:
340 Service was successfully installed or removed
342 Service was not installed or removed
346 Please be aware that the following patterns of
347 boot script file names will be not accepted by
369 with the wildcard character
371 Beside this all boot script file names beginning with one
372 of the following characters
382 Boot script sometimes misses comments.
386 configuration file for
388 which defines the LSB System Facilities.
390 .I /etc/insserv.conf.d/
391 directory for further configuration files for declaring
392 LSB System Facilities.
394 .I /etc/insserv/overrides/
395 path to replace existing LSB comment headers with the comment
396 headers found in this path.
403 init script base directory as
404 required by the Linux Standard Base Specification (LSB).
406 .IR /etc/init.d/.depend.boot ,
408 .IR /etc/init.d/.depend.start ,
410 .I /etc/init.d/.depend.stop
414 like dependency files produced by
417 .IR booting ", " starting ", and " stopping
435 2000\-2008 Werner Fink,
437 2000\-2003 SuSE GmbH Nuernberg, Germany,
439 2007 SuSE Linux Products GmbH Nuernberg, Germany.
441 2008 SuSE Linux Products GmbH Nuernberg, Germany.
443 Werner Fink <feedback@suse.de>