Managing Serviceguard 12th Edition, March 2006
Configuring Packages and Their Services
Creating the Package Control Script
Chapter 6 301
# DTC manager information for each DTC.
# Example: DTC[0]=dtc_20
#DTC_NAME[0]=
#
#HA_NFS_SCRIPT_EXTENSION
# If the package uses HA NFS, this variable can be used to alter the
# name of the HA NFS script. If not set, the name of this script is
# assumed to be "ha_nfs.sh". If set, the "sh" portion of the default
# script name is replaced by the value of this variable. So if
# HA_NFS_SCRIPT_EXTENSION is set to "package1.sh", for example, the name
# of the HA NFS script becomes "ha_nfs.package1.sh". In any case,
# the HA NFS script must be placed in the same directory as the package
# control script. This allows multiple packages to be run out of the
# same directory, as needed by SGeSAP.
#HA_NFS_SCRIPT_EXTENSION=""
The above excerpt from the control script shows the assignment of values
to a set of variables. The remainder of the script uses these variables to
control the package by executing Logical Volume Manager commands,
HP-UX commands, and Serviceguard commands including cmrunserv,
cmmodnet, and cmhaltserv. Examine a copy of the control script template
to see the flow of logic. Use the following command:
# cmmakepkg -s | more
The main function appears at the end of the script.
Note that individual variables are optional; you should include only as
many as you need for proper package operation. For example, if your
package does not need to activate a volume group, omit the VG variables;
if the package does not use services, omit the corresponding
SERVICE_NAME, SERVICE_CMD, and SERVICE_RESTART variables; and so
on.
If you have defined an EMS resource in the package configuration file
that is labeled as DEFERRED, you need to define a
DEFERRED_RESOURCE_NAME in the package control script. Specify only the
deferred resources, using the DEFERRED_RESOURCE_NAME parameter:
DEFERRED_RESOURCE_NAME[0]="/net/interfaces/lan/status/lan0"
DEFERRED_RESOURCE_NAME[1]="/net/interfaces/lan/status/lan1"
After customizing the script, distribute it to each node in the cluster
using rcp, ftp, or your favorite method of copying.