Setting up an HP SIM server 5.x on a Linux-based Serviceguard Cluster 444847-003, March 2009

25
# NFS, Apache) or not. If the value of the HA server enable flag
(HA_APP_SERVER)
# equals to either "pre
-
IP" or "post
-
IP" and the Toolkit Interface
Script
# (toolkit.sh) exists in the package directory then
the package will be
# configured for use with the HA server, and the interface script will
be
# invoked as a sub
-
script.
#
# This function has one parameter passed to it, which then will be
passed to the
# toolkit.sh script:
#
#
-
start
-
to indicate the p
ackage is starting up
#
-
stop
-
to indicate the package is shutting down
#
function verify_ha_server
{
HA_APP_SCRIPT="/etc/init.d/sgsim"
if [[
-
x $HA_APP_SCRIPT ]]
then
$HA_APP_SCRIPT $1
test_return 50
else
echo
-
e
"ERROR: The Toolkit Interface Script
\
"$HA_APP_SCRIPT
\
"
"
echo
-
e "
\
t does not exist or is not executable. To run HA
server on this node,"
echo
-
e "
\
t either copy the
\
"toolkit.sh
\
" to this package
directory or use the"
echo
-
e "
\
t
chmod(1) command to make file $HA_APP_SCRIPT
executable."
let 0
test_return 50
fi
}
# Sanity Check on LVM. Will check for LVM version and metadata type.
function lvm_sanity_check
{
typeset vg=$1
# If lvm is lvm1 then just return.
if (( LVM_VER == 1 )); then
return 1
fi
# Using lvm2.
return 0
}
# Function to add/remove tags for vgs.
function vg_tag
{
typeset op=$1
typeset vg=$2
typeset tag=$3
typeset result
if [[ x$op = xaddtag ]] || [[ x$op
= xdeltag ]]; then
echo "Attempting to $op to vg $vg..."