Chapter 9. The Operating System
The system administrator will have the opportunity to customize runlevels by simply adding,
moving, or removing the symbolic links in
if symbolic links are being used, or
method is being used.
To get the default behavior for your package, put in your
and in your
if [ "$1" = purge ]; then
. Note that if your package changes runlevels or priority, you may have to remove and
recreate the links, since otherwise the old links may persist. Refer to the documentation of
This will use a default sequence number of 20. If it does not matter when or in which order the
script is run, use this default. If it does, then you should talk to the maintainer of the
package or post to
, and they will help you choose a number.
For more information about using
please consult its man page
is provided to make it easier for package maintainers to properly
invoke an initscript, obeying runlevel and other locally defined constraints that might limit a
package's right to start, stop and otherwise manage services. This program may be used by
maintainers in their packages' scripts.
The use of
to invoke the
initscripts is strongly recom
, instead of calling them directly.
will pass any action requests (start, stop, reload, restart. . . ) to the
script, filtering out requests to start or restart a service out of its intended run
Most packages will simply need to change:
if which invoke rc.d >/dev/null 2>&1; then
In the future, the use of invoke rc.d to invoke initscripts shall be made mandatory. Maintainers are advised to
switch to invoke rc.d as soon as possible.