HP-UX Containers (SRP) A.03.00 Administrator's Guide

118
then
# use local IP as gateway
emsg=$(/usr/sbin/route delete default $srp_gateway 0 \
source $srp_ip 2>&1)
else
# use remote gateway
emsg=$(/usr/sbin/route delete default $srp_gateway 1 \
source $srp_ip 2>&1)
fi
if (($? != 0)); then
print "ERROR: $emsg" >$2
rval=1
fi
let index=$index+1
done
return $rval
}
################
# main routine
################
sg_log 5 "SRP routing entry configuration script"
#########################################################################
#
# Customer defined external script must be specified with three required
# entry points: start, stop, and validate.
#
# It's not recommended to add additional entry points to the script
# due to potential name space collision with future Serviceguard releases.
#
#########################################################################
typeset -i exit_val=0
case ${1} in
start)
srp_route_add
exit_val=$?
;;
stop)
srp_route_delete
exit_val=$?
;;
validate)
exit_val=0
;;
*)
sg_log 0 "INFO: Unknown operation: $1"
;;
esac
exit $exit_val