migration from private to rsa
[external/insserv.git] / insserv.8.in
1 .\"
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
6 .\"
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.
11 .\"
12 @@BEGIN_SUSE@@
13 .TH INSSERV 8 "Jul 29, 2008" "Version 1.11" "The SuSE boot concept"
14 .UC 8
15 .OS SuSE Linux
16 @@ELSE_SUSE@@
17 .TH INSSERV 8 "Jul 29, 2008" "Version 1.11"
18 .UC 8
19 .OS Debian
20 @@END_SUSE@@
21 .SH NAME
22 insserv \- Enable an installed system init script
23 .SH SYNOPSIS
24 .\"
25 .B insserv
26 .RB [ \-v ]
27 .RB [ \-c\ <config> ]
28 .RB [ \-p\ <path> ]
29 .RB [ \-d ]
30 .RB [ \-f ]
31 .RI [[ / ] path/to/init.d/ ] script \ ...
32 .PP
33 .B insserv
34 .RB [ \-v ]
35 .RB [ \-c\ <config> ]
36 .RB [ \-p\ <path> ]
37 @@BEGIN_SUSE@@
38 .RI [[ / ] path/to/init.d/ ] script [ ,start=<lvl1> [ ,<lvl2>\ ... ]
39 @@ELSE_SUSE@@
40 .RI [[ / ] path/to/init.d/ ] script [ ,start=<lvl1> [ ,<lvl2>\ ... ] ,stop=<lvl1> [ ,<lvl2>\ ... ]]
41 @@END_SUSE@@
42 .PP
43 .B insserv
44 .RB [ \-v ]
45 .RB [ \-c\ <config> ]
46 .RB [ \-p\ <path> ]
47 .B \-r
48 .RB [ \-d ]
49 .RB [ \-f ]
50 .RI [[ / ] path/to/init.d/ ] script \ ...
51 .PP
52 .B insserv
53 .B \-h
54 .PP
55 @@BEGIN_SUSE@@
56 .RB /usr/lib/lsb/install_initd
57 .RI [[ / ] path/to/init.d/script ]
58 .PP
59 .RB /usr/lib/lsb/remove_initd
60 .RI [[ / ] path/to/init.d/script ]
61 @@END_SUSE@@
62 .SH DESCRIPTION
63 .B insserv
64 enables an installed system init script (`boot script')
65 by reading the comment header of the script, e.g.:
66 .sp 1
67 .in +1l
68 .nf
69  ### BEGIN INIT INFO
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
81  ### END INIT INFO
82 .fi
83 .in -1l
84 .sp 1
85 and calculating the dependencies between all scripts.
86 @@BEGIN_SUSE@@
87 Please note, that the
88 .B Default\-Stop
89 are ignored in SuSE Linux, because the SuSE boot script concept
90 uses a differential link scheme (see
91 .IR init.d (7)).
92 @@ELSE_SUSE@@
93 Please be aware that the line
94 .sp 1
95 .in +1l
96 .nf
97  # Required-Stop:  boot_facility_1 [ boot_facility_2 ...]
98 .fi
99 .in -1l
100 .sp 1
101 declares facilities which must be available during shutdown of the service
102 declared in the
103 .B Provides
104 tag.  Same holds true for
105 .sp 1
106 .in +1l
107 .nf
108  # Should-Stop:    boot_facility_1 [ boot_facility_2 ...]
109 .fi
110 .in -1l
111 .sp 1
112 which declares facilities which should be available during shutdown of
113 the service declared in the 
114 .B Provides
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.
118 @@END_SUSE@@
119 .PP
120 The optional
121 .B X\-Start\-Before
122 keyword implies that the script using this keyword
123 should be started
124 .B before
125 the specified service names.
126 Wereas the optional
127 .B X\-Stop\-After
128 keyword implies that the script using this keyword
129 should be stopped
130 .B after
131 the specified service names. Both implies that those
132 services now depend on the specifying script. 
133 With known dependencies and runlevel(s)
134 .B insserv
135 sets and reorders the corresponding symbolic links
136 of the concerned runlevels
137 @@BEGIN_SUSE@@
138 directories (see \fI init.d\fR (7)).
139 @@ELSE_SUSE@@
140 directories.
141 @@END_SUSE@@
142 Known runlevels are:
143 .sp 1
144 .in +1l
145 .nf
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
153 @@BEGIN_SUSE@@
154  \fBS\fR\   used during boot into single user mode
155  \fBB\fR\   used during boot before any other runlevel
156 @@ELSE_SUSE@@
157  \fBS\fR\   used during boot before any other runlevel
158 @@END_SUSE@@
159 .fi
160 .in -1l
161 .sp 1
162 .PP
163 .B insserv
164 scans for
165 .B System Facilities
166 in the configuration file
167 .I /etc/insserv.conf
168 and each file in the directory
169 .IR /etc/insserv.conf.d/ .
170 Each line which begins with
171 .B $
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 :
178 .sp 1
179 .in +1l
180 .nf
181  # All local filesystems are mounted
182  # (done during boot phase)
183  $local_fs       boot
184
185  # Low level networking
186  $network        network route
187
188  # Named is operational
189  $named          named
190
191  # All remote filesystems are mounted
192  # (in some cases /usr may be remote).
193  $remote_fs      $local_fs nfs
194
195  # System logger is operational
196  $syslog         syslog
197
198  # All network daemons are running
199  $netdaemons     portmap inetd
200
201  # Services which need to be interactive
202  <interactive>   boot.crypto
203 .fi
204 .in -1l
205 .sp 1
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
210 .B <
211 and ending with
212 .B >
213 are keywords.  Currently
214 .B <interactive>
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
218 or runlevel change.
219 .P
220 Beside the defined
221 .B System Facilities
222 in the configuration file
223 .IR /etc/insserv.conf ,
224 .B insserv
225 also knows the special facility
226 .BR $all .
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.
230 .\"
231 .SH OPTIONS
232 Currently there exists nine options for
233 .BR insserv .
234 .TP
235 .BR \-v ,\  \-\-verbose
236 Write out what is currently going on.
237 .TP
238 .BR \-c\ <config> ,\  \-\-config\ <config>
239 Specify path to the insserv.conf file and the insserv.conf.d
240 directory.  Useful for testing.
241 .TP
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/ ).
246 .TP
247 .BR \-p\ <path> ,\  \-\-path\ <path>
248 Specify path to init.d directory.  Useful for testing.
249 .TP
250 .BR \-n ,\  \-\-dryrun
251 Do not update symlinks.
252 .TP
253 .BR \-r ,\  \-\-remove
254 Remove the listed scripts from all runlevels.
255 .TP
256 .BR \-d ,\  \-\-default
257 Use default runlevels a defined in the scripts.
258 This may restore an edited runlevel link scheme.
259 .TP
260 .BR \-f ,\  \-\-force
261 Ignore if a required service is missed.
262 .TP
263 .BR \-h ,\  \-\-help
264 Print out short usage message.
265 .PP
266 But you may use the argument syntax described in the
267 following section.
268 .SH ARGUMENTS
269 .TP
270 .RI [[ / ] path/to/init.d/ ]
271 Relative or absolute path to the init scripts base directory.
272 @@BEGIN_SUSE@@
273 For the SuSE Linux boot concept, this defaults to
274 @@ELSE_SUSE@@
275 This defaults to
276 @@END_SUSE@@
277 .I /etc/init.d/
278 in compliance with the LSB specification.
279 In this case
280 .B insserv
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
285 .BR \-d ).
286 Note that if a relative path is used
287 .B insserv
288 has to be called from the root directory.
289 .TP
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.
295 .B insserv
296 checks for the existence of these scripts.
297 For the runlevels the information found in
298 the script is used.
299 .TP
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.
305 Note that
306 .BR <lvl1> ,\  <lvl2> ,\ ...
307 are the known runlevels explained above.
308 The extension
309 .IR ,stop=<lvl1> [ ,<lvl2> ]]
310 is possible
311 @@BEGIN_SUSE@@
312 is possible but ignored on SuSE Linux.
313 @@ELSE_SUSE@@
314 is also possible.
315 @@END_SUSE@@
316 .TP
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.
322 .B insserv
323 checks for the existence of these scripts.
324 .\"
325 .SH OVERRIDES
326 Beside using the extensions
327 .IR ,start=<lvl1> [ ,<lvl2> ]]
328 and
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/ .
335 .\"
336 .SH EXIT CODES
337 The exit codes have the following conditions:
338 .RS 7
339 .IP 0 5
340 Service was successfully installed or removed
341 .IP 1 5
342 Service was not installed or removed
343 .RE
344 .RS 5
345 .SH NOTE
346 Please be aware that the following patterns of
347 boot script file names will be not accepted by
348 .BR insserv:
349 .sp 1
350 .in +1l
351 .nf
352 @@BEGIN_SUSE@@
353         *.local
354 @@END_SUSE@@
355         *.dpkg*
356         *.rpm*
357         *.ba*
358         *.old
359         *.new
360         *.org
361         *.orig
362         *.save
363         *.swp
364         *.core
365         *~
366 .fi
367 .in -1l
368 .sp 1
369 with the wildcard character
370 .BR * .
371 Beside this all boot script file names beginning with one
372 of the following characters
373 .sp 1
374 .in +1l
375 .nf
376         $.#%_+-\\*[]^:()~
377 .fi
378 .in -1l
379 .sp 1
380 will be ignored.
381 .SH BUGS
382 Boot script sometimes misses comments.
383 .SH FILES
384 .TP
385 .I /etc/insserv.conf
386 configuration file for
387 .B insserv
388 which defines the LSB System Facilities.
389 .TP
390 .I /etc/insserv.conf.d/
391 directory for further configuration files for declaring
392 LSB System Facilities.
393 .TP
394 .I /etc/insserv/overrides/
395 path to replace existing LSB comment headers with the comment
396 headers found in this path.
397 .TP
398 .I /etc/init.d/
399 path to the
400 @@BEGIN_SUSE@@
401 SuSE
402 @@END_SUSE@@
403 init script base directory as
404 required by the Linux Standard Base Specification (LSB).
405 .PP
406 .IR /etc/init.d/.depend.boot ,
407 .br
408 .IR /etc/init.d/.depend.start ,
409 .br
410 .I  /etc/init.d/.depend.stop
411 .in +7
412 The
413 .BR make (1)
414 like dependency files produced by
415 .B insserv
416 for
417 .IR booting ", " starting ", and " stopping
418 with the help of
419 .BR startpar (8).
420 .in -7
421
422 .\"
423 .SH SEE ALSO
424 @@BEGIN_SUSE@@
425 .BR init.d (7),
426 @@END_SUSE@@
427 .BR init (7),
428 @@BEGIN_SUSE@@
429 .BR startproc (8),
430 .BR checkproc (8),
431 .BR killproc (8),
432 @@END_SUSE@@
433 .BR startpar (8).
434 .SH COPYRIGHT
435 2000\-2008 Werner Fink,
436 .br
437 2000\-2003 SuSE GmbH Nuernberg, Germany,
438 .br
439 2007 SuSE Linux Products GmbH Nuernberg, Germany.
440 .br
441 2008 SuSE Linux Products GmbH Nuernberg, Germany.
442 .SH AUTHOR
443 Werner Fink <feedback@suse.de>