Managing HP Serviceguard A.11.20.10 for Linux, December 2012

7.7.2.1 Customizing the Package Control Script
You need to customize as follows; see the relevant entries under “Package Parameter Explanations
(page 168) for more discussion.
Update the PATH statement to reflect any required paths needed to start your services.
Specify the Remote Data Replication Method and Software RAID Data Replication method if
necessary.
CAUTION: If you are not using the serviceguard-xdc or CLX products, do not modify the
REMOTE DATA REPLICATION DEFINITION section. If you are using one of these products,
consult the product’s documentation.
If you are using LVM, enter the names of volume groups to be activated using the VG[] array
parameters, and select the appropriate options for the storage activation command, including
options for mounting and unmounting file systems, if necessary. Specify the file system type
(ext3 is the default for RHEL 5; ext4 is the default for RHEL 6, reiserfs, or gfs can also
be used; see the fs_ parameter descriptions starting with fs_mount_retry_count (page 181)
for more information).
NOTE: Red Hat GFS and reiserfs are not supported in Serviceguard A.11.20.00.
Add the names of logical volumes and the file system that will be mounted on them.
Specify the filesystem mount and unmount retry options.
If your package uses a large number of volume groups or disk groups or mounts a large
number of file systems, consider increasing the number of concurrent vgchange,
mount/umount, and fsck operations;
Define IP subnet and IP address pairs for your package. IPv4 or IPv6 addresses are allowed.
Add service name(s).
Add service command(s)
Add a service restart parameter, if you so decide.
For more information about services, see the discussion of the service_ parameters starting
with service_name (page 177).
7.7.2.2 Adding Customer Defined Functions to the Package Control Script
You can add additional shell commands to the package control script to be executed whenever
the package starts or stops. Enter these commands in the CUSTOMER DEFINED FUNCTIONS area
of the script.
If your package needs to run short-lived processes, such as commands to initialize or halt a
packaged application, you can also run these from the CUSTOMER DEFINED FUNCTIONS.
You can also use the CUSTOMER DEFINED FUNCTIONS to determine why a package has shut
down; see “Determining Why a Package Has Shut Down” (page 125).
An example of this portion of the script follows, showing the date and echo commands logging
starts and halts of the package to a file.
# START OF CUSTOMER DEFINED FUNCTIONS
# This function is a place holder for customer defined functions.
# You should define all actions you want to happen here, before the service is
# started. You can create as many functions as you need.
function customer_defined_run_cmds
{
# ADD customer defined run commands.
228 Cluster and Package Maintenance