Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007 Installation Manual page 399

Table of Contents

Advertisement

WARNING: Faulty init Scripts May Halt Your System
Faulty init scripts may hang your machine. Edit such scripts with great care and,
if possible, subject them to heavy testing in the multiuser environment. Find
some useful information about init scripts in
(page 375).
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 19.1, "A Minimal INIT INFO Block"
Example 19.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
FOO
$syslog $remote_fs
$syslog $remote_fs
3 5
0 1 2 6
Start FOO to allow XY and provide YZ
Section 19.2.1, "Runlevels"
(page 381).
Booting and Configuring a Linux System
381

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents