#!/usr/bin/ksh
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

# module to test the zone boot. The parameters are passed in options  

MYNAME=`basename ${0}`
MYDIR=`dirname ${0}`

typeset opt

while getopts 'R:G:P:' opt
do
        case "${opt}" in
                R)      RESOURCE=${OPTARG};;
                G)      RESOURCEGROUP=${OPTARG};;
                P)      PARDIR=${OPTARG};;
                *)      logger -p daemon.err \
                        "ERROR: ${MYNAME} Option ${OPTARG} unknown"
                        exit 1;;
        esac
done

. ${MYDIR}/../etc/config                  # debugging flags
. ${MYDIR}/functions                      # agent specific functions
. ${MYDIR}/../../lib/functions            # functions common for all the agents
. ${MYDIR}/../../lib/functions_common     # functions common for all the zone components

debug_message "Method: ${MYNAME} - Begin"
${SET_DEBUG}

# check the syntax of the options

if ! validate_options
then
        debug_message "Method: ${MYNAME} - End (Exit 100)"
        exit 100
fi

# source the zone boot specific parameter file and do the check

. ${PARFILE}

check_sczbt

debug_message "Method: ${MYNAME} - End ${rc_check_sczbt}"
exit ${rc_check_sczbt}
