Managing Serviceguard 11th Edition, Version A.11.16, Second Printing June 2004

Configuring Packages and Their Services
Writing the Package Control Script
Chapter 6256
Writing 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 (in Guided Mode) to create the control script as it creates your
package configuration. You can also use HP-UX commands to create or
modify the package control script.
Using Serviceguard Manager to Write the Package
Control Script
Using the guided method in Serviceguard Manager, a standard control
script can be automatically created in the configuration screens. When
you click Apply, it is automatically distributed to all the nodes. Click the
Preview button to view the script as it is being created and modified.
You can choose to edit the control script yourself if you wish. After that,
however, Serviceguard Manager will not be able to read your edits or to
modify the script further.
Serviceguard Manager does not distribute other files, such as the
HA-NFS toolkit, the ECM toolkit, or Metrocluster scripts; you have to
manually distribute such files.
Using Commands to Write the Package Control Script
Each package must have a separate control script, which must be
executable.
For security reasons, it 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.
Use the following procedure to create a control script for the sample
package pkg1.
First, generate a control script template: