INSSERV(8) The SuSE boot concept INSSERV(8)
insserv - Enable an installed system init script
insserv [-v] [-c <config>] [-p <path>] [-d] [-f] [[/]path/to/init.d/]script ...
insserv [-v] [-c <config>] [-p <path>]
insserv [-v] [-c <config>] [-p <path>] -r [-d] [-f] [[/]path/to/init.d/]script ...
insserv enables an installed system init script (`boot script') by reading the comment
header of the script, e.g.:
### BEGIN INIT INFO
# Provides: boot_facility_1 [ boot_facility_2 ...]
# Required-Start: boot_facility_1 [ boot_facility_2 ...]
# Required-Stop: boot_facility_1 [ boot_facility_2 ...]
# Should-Start: boot_facility_1 [ boot_facility_2 ...]
# Should-Stop: boot_facility_1 [ boot_facility_2 ...]
# X-Start-Before: boot_facility_1 [ boot_facility_2 ...]
# X-Stop-After: boot_facility_1 [ boot_facility_2 ...]
# Default-Start: run_level_1 [ run_level_2 ...]
# Default-Stop: run_level_1 [ run_level_2 ...]
# X-Interactive: true
# Short-Description: single_line_description
# Description: multiline_description
### END INIT INFO
and calculating the dependencies between all scripts. Please note, that the Default-Stop
are ignored in SuSE Linux, because the SuSE boot script concept uses a differential link
scheme (see init.d(7)).
The optional X-Interactive keyword implies that the script using this keyword should be
started alone in a concurrent boot configuration because it interact with the user at the
console. Only the value `true' is recogniced. All other are ignored.
The optional X-Start-Before keyword implies that the script using this keyword should be
started before the specified service names. Whereas the optional X-Stop-After keyword
implies that the script using this keyword should be stopped after the specified service
names. Both implies that those services now depend on the specifying script. With known
dependencies and runlevel(s) insserv sets and reorders the corresponding symbolic links of
the concerned runlevels directories (see init.d (7)). Known runlevels are:
0 used for System halt
1 used for single user mode
2 used for local multiuser without remote network
3 used for full multiuser with network
4 reserved for local use
5 used for full multiuser with network and xdm
6 used for System reboot
S used during boot into single user mode
B used during boot before any other runlevel
insserv scans for System Facilities in the configuration file /etc/insserv.conf and each
file in the directory /etc/insserv.conf.d/. Each line which begins with $ and a following
name defines a system facility accordingly to the Linux Standard Base Specification (LSB),
All names followed by such a system facility will declare the required dependencies of the
facility. Here is an example for /etc/insserv.conf:
# All local filesystems are mounted
# (done during boot phase)
# Low level networking
$network network route
# Named is operational
# All remote filesystems are mounted
# (in some cases /usr may be remote).
$remote_fs $local_fs nfs
# System logger is operational
# All network daemons are running (This was removed in LSB 1.2)
$netdaemons portmap inetd
# Services which need to be interactive
Names starting with a `+' sign are marked as optional. If the service with the name after
the plus sign is available it will be used, if not available it is ignored silently.
Words beginning with < and ending with > are keywords. Currently <interactive> is the
only know keyword for marking a service as an interactive one, e.g. a service which
requires a passphrase or password input during boot or runlevel change. The special
facility $null is used to enforce an empty dependency in case of Should-Stop and Required-
Stop otherwise insserv assumes the same dependencies as for the Start case.
In addition to the defined System Facilities in the configuration file /etc/insserv.conf,
insserv also knows the special facility $all. This facility indicates that a service
should be inserted at the end of all services at starting and at the very begining at
stopping. Clearly all services using this facility will be grouped into one starting or
Currently there exists nine options for insserv.
Write out what is currently going on.
-c <config>, --config <config>
Specify path to the insserv.conf file and the insserv.conf.d directory. Useful for
-o <path>, --override <path>
LSB comment headers found in this path will override existing LSB comment headers
of scripts in the init.d directory (default path is /etc/insserv/overrides/).
-p <path>, --path <path>
Specify path to init.d directory. Useful for testing.
Do not update symlinks.
Remove the listed scripts from all runlevels.
Use default runlevels as defined in the scripts. This may restore an edited run-
level link scheme.
Ignore if a required service is missed. Beside this if start and or stop levels are
specified on the command line the default levels of the script will be ignored.
-u <path>, --upstart-job <path>
Path to replace existing upstart job path. (default path is /lib/init/upstart-
Print out short usage message.
But you may use the argument syntax described in the following section.
Relative or absolute path to the init scripts base directory. For the SuSE Linux
boot concept, this defaults to /etc/init.d/ in compliance with the LSB specifica-
tion. In this case insserv does not add or remove a script to the runlevels
declared in the script headers, but may re-order the runlevels if the order of the
currently enabled scripts has changed (see option -d). Note that if a relative
path is used insserv has to be called from the root directory.
List of scripts which have to be added to the runlevels. If a path is used it
should point to the absolute or relative location of the boot scripts. insserv
checks for the existence of these scripts. For the runlevels the information found
in the script is used.
List of scripts which have to be added to the specified runlevels to be started
with. You may use this extension to override the default values for start and stop
runlevels of the script. Note that lvl1, lvl2, ... are the known runlevels
explained above. The extension ,stop=<lvl1,lvl2,...> is also possible.
-r [[/]path/to/init.d/]script ...
List of scripts which should be removed from the runlevels. If a path is used it
should point to the absolute or relative location of the boot scripts. insserv
checks for the existence of these scripts.
Beside using the extensions ,start=<lvl1,lvl2,...> and ,stop=<lvl1,lvl2,...> it is possi-
ble to use override files replace a LSB comment header or simple provide a missing LSB
comment header. This can be done by placing a file with the new LSB comment header using
the same name as the boot or init script in the directory /etc/insserv/overrides/. For
third party boot scripts without LSB header it is possible to add a file with the same
name in the directory /usr/share/insserv/overrides/ to make them completely LSB compliant.
UPSTART JOB COMPATIBILITY
To allow upstart jobs to work as init.d scripts, insserv will recognize a symlink from
path/to/init.d/script to /lib/init/upstart-job as upstart jobs, and instead of reading the
header from the file will run the script with the argument lsb-header to get the script
The exit codes have the following conditions:
0 Service was successfully installed or removed
1 Service was not installed or removed
Please be aware that the following patterns of boot script file names will be not accepted
with the wildcard character *. Beside this all boot script file names beginning with one
of the following characters
will be ignored.
Boot scripts sometimes lack a LSB comment header. Contact a package maintainer or devel-
oper of the software which provides the script to have a LSB comment header added to it.
configuration file for insserv which defines the LSB System Facilities.
directory for further configuration files for declaring LSB System Facilities.
path to replace existing LSB comment headers with the comment headers found in this
path to the SuSE init script base directory as required by the Linux Standard Base
The make(1) like dependency files produced by insserv for booting, starting, and
stopping with the help of startpar(8).
init.d(7), init(7), startproc(8), checkproc(8), killproc(8), startpar(8).
2000-2009 Werner Fink,
2009 SuSE Linux Products GmbH Nuernberg, Germany.
2000-2003 SuSE GmbH Nuernberg, Germany,
2007-2009 SuSE Linux Products GmbH Nuernberg, Germany.
Werner Fink <firstname.lastname@example.org>
3rd Berkeley Distribution Jul 29, 2008 INSSERV(8)