Managing Serviceguard 13th Edition, February 2007

Configuring Packages and Their Services
Creating the Package Control Script
Chapter 6 275
Creating the Package Control Script
The package control script contains all the information necessary to run
all the services in the package, monitor them during operation, react to a
failure, and halt the package when necessary. You can use Serviceguard
Manager, HP-UX commands, or a combination of both, to create or
modify the package control script.
Each package must have a separate control script, which must be
executable.
For security reasons, the control script must reside in a directory with
the string cmcluster in the path. The control script is placed in the
package directory and is given the same name as specified in the
RUN_SCRIPT and HALT_SCRIPT parameters in the package ASCII
configuration file. The package control script template contains both the
run instructions and the halt instructions for the package. You can use a
single script for both run and halt operations, or, if you wish, you can
create separate scripts.
On systems that support VERITAS Cluster File System and Cluster
Volume Manager, Serviceguard automatically creates the necessary
control scripts when you create the CFS/CVM 4.1 multi-node or system
multi-node package. HP strongly recommends that you never edit the
configuration or control script files for these packages, although
Serviceguard does not forbid it. Create and modify the information using
cfs admin commands only.
For failover packages, create the control script by editing the control
script (pkg_name.sh) file. Use the following procedure to create the
template for the sample failover package pkg1.
First, generate a control script template:
# cmmakepkg -s /etc/cmcluster/pkg1/pkg1.sh
You can customize the script; see “Customizing the Package Control
Script” below.
Creating Failover Packages For Database Products
To coordinate the startup and shutdown of database software with
cluster node startup and shutdown, you can use the database template
files provided with the separately purchasable Enterprise Cluster