Novell LINUX ENTERPRISE DESKTOP 11 - ADMINISTRATION GUIDE 17-03-2009 Administration Manual page 99

Hide thumbs Also See for LINUX ENTERPRISE DESKTOP 11 - ADMINISTRATION GUIDE 17-03-2009:
Table of Contents

Advertisement

WARNING: Faulty init Scripts May Halt Your System
Faulty init scripts may hang your machine up. Edit such scripts with great care
and, if possible, subject them to heavy testing in the multiuser environment.
Find useful information about init scripts in
To create a custom init script for a given program or service, use the file /etc/init
.d/skeleton as a template. Save a copy of this file under the new name and edit
the relevant program and filenames, paths and other details as needed. You may also
need to enhance the script with your own parts, so the correct actions are triggered by
the init procedure.
The INIT INFO block at the top is a required part of the script and must be edited.
See
Example 9.1, "A Minimal INIT INFO Block"
Example 9.1 A Minimal INIT INFO Block
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Description:
### END INIT INFO
In the first line of the INFO block, after Provides:, specify the name of the program
or service controlled by this init script. In the Required-Start: and
Required-Stop: lines, specify all services that need to be started or stopped before
the service itself is started or stopped. This information is used later to generate the
numbering of script names, as found in the runlevel directories. After
Default-Start: and Default-Stop:, specify the runlevels in which the service
should automatically be started or stopped. Finally, for Description:, provide a
short description of the service in question.
To create the links from the runlevel directories (/etc/init.d/rc?.d/) to the
corresponding scripts in /etc/init.d/, enter the command insserv
new-script-name. The insserv program evaluates the INIT INFO header to create
the necessary links for start and stop scripts in the runlevel directories (/etc/init
.d/rc?.d/). The program also takes care of the correct start and stop order for each
runlevel by including the necessary numbers in the names of these links. If you prefer
FOO
$syslog $remote_fs
$syslog $remote_fs
3 5
0 1 2 6
Start FOO to allow XY and provide YZ
Section 9.2.1, "Runlevels"
(page 87).
Booting and Configuring a Linux System
(page 81).
87

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LINUX ENTERPRISE DESKTOP 11 - ADMINISTRATION GUIDE 17-03-2009 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Suse linux enterprise desktop 11

Table of Contents