1
Configuration of System V init under Debian GNU/Linux
3
Most Unix versions have a file here that describes how the scripts
4
in this directory work, and how the links in the /etc/rc?.d/ directories
5
influence system startup/shutdown.
7
For Debian, this information is contained in the policy manual, chapter
8
"System run levels and init.d scripts". The Debian Policy Manual is
11
http://www.debian.org/doc/debian-policy/#contents
13
The Debian Policy Manual is also available in the Debian package
14
"debian-policy". When this package is installed, the policy manual can be
15
found in directory /usr/share/doc/debian-policy. If you have a browser
16
installed you can probably read it at
18
file://localhost/usr/share/doc/debian-policy/
20
Some more detailed information can also be found in the files in the
21
/usr/share/doc/sysv-rc directory.
23
Debian Policy dictates that /etc/init.d/*.sh scripts must work properly
24
when sourced. The following additional rules apply:
26
* /etc/init.d/*.sh scripts must not rely for their correct functioning
27
on their being sourced rather than executed. That is, they must work
28
properly when executed too. They must include "#!/bin/sh" at the top.
29
This is useful when running scripts in parallel.
31
* /etc/init.d/*.sh scripts must conform to the rules for sh scripts as
32
spelled out in the Debian policy section entitled "Scripts" (§10.4).
34
Use the update-rc.d command to create symbolic links in the /etc/rc?.d
35
as appropriate. See that man page for more details.
37
All init.d scripts are expected to have a LSB style header documenting
38
dependencies and default runlevel settings. The header look like this
39
(not all fields are required):
43
# Required-Start: $remote_fs $syslog
44
# Required-Stop: $remote_fs $syslog
45
# Should-Start: $portmap
46
# Should-Stop: $portmap
49
# Default-Start: 2 3 4 5
52
# Short-Description: Example initscript
53
# Description: This file should be used to construct scripts to be
54
# placed in /etc/init.d.
57
More information on the format is available from insserv(8). This
58
information is used to dynamicaly assign sequence numbers to the
59
boot scripts and to run the scripts in parallel during the boot.
60
See also /usr/share/doc/insserv/README.Debian.