#! /usr/bin/ksh
#
# Copyright (c) 2000 by Sun Microsystems, Inc.
# All rights reserved.
#

#
# globals
#
SSPVAR=${SSPVAR:-/var/opt/SUNWssp}	export SSPVAR

if [ ! -d ${SSPVAR} ]; then
	if [ -d /a${SSPVAR} ]; then
		SSPVAR="/a${SSPVAR}"
	fi
fi

SSPRESOURCE=${SSPVAR}/.ssp_private/ssp_resource

#
# Must run as root
#
uid=`id`
eval ${uid%%\(*}

if [[ $uid -ne 0 ]]
then
	echo "You must be root to run."
	exit 0
fi

if grep 'Ultra-Enterprise-10000.MaxHeartBeats:11' ${SSPRESOURCE} > /dev/null
then
	# Change 11 to 4 
	ed -s ${SSPRESOURCE} << EOF >/dev/null
/^Ultra-Enterprise-10000.MaxHeartBeats
s/:11/:4/
.
w
q
EOF

else
	echo "MaxHeartBeats not set at 11; therefore not changing back to 4."
fi
