New xvm_register
  1 #!/usr/bin/ksh
  2 #
  3 # CDDL HEADER START
  4 #
  5 # The contents of this file are subject to the terms of the
  6 # Common Development and Distribution License (the License).
  7 # You may not use this file except in compliance with the License.
  8 #
  9 # You can obtain a copy of the license at usr/src/CDDL.txt
 10 # or http://www.opensolaris.org/os/licensing.
 11 # See the License for the specific language governing permissions
 12 # and limitations under the License.
 13 #
 14 # When distributing Covered Code, include this CDDL HEADER in each
 15 # file and include the License file at usr/src/CDDL.txt.
 16 # If applicable, add the following below this CDDL HEADER, with the
 17 # fields enclosed by brackets [] replaced with your own identifying
 18 # information: Portions Copyright [yyyy] [name of copyright owner]
 19 #
 20 # CDDL HEADER END
 21 #
 22 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 23 # Use is subject to license terms.
 24 #
 25 #ident   "@(#)xvm_register 1.2     08/02/14 SMI"
 26 #
 27 #       DO NOT EDIT THIS FILE
 28 
 29 typeset opt
 30 
 31 while getopts 'f:' opt
 32 do
 33         case "$opt" in
 34            f)   MYCONFIG=${OPTARG};;
 35            *)   echo "ERROR: ${MYNAME} Option ${OPTARG} unknown"
 36                 echo "Usage: ${MYNAME} -f <config file>"
 37                 exit 1;;
 38         esac
 39 done
 40 
 41 [ -z "${MYCONFIG}" ] && MYCONFIG=/opt/SUNWscxvm/util/xvm_config
 42 
 43 . ${MYCONFIG}
 44 
 45 /usr/cluster/bin/clrs create -g ${RG} -t SUNW.gds \
 46 -p Start_command="/opt/SUNWscxvm/bin/control_xvm \
 47 -R '${RS}' -G '${RG}' -D '${DOMAIN}' -P '${DOMAIN_PATHNAME}' -M '${FAILOVER}' start " \
 48 -p Stop_command="/opt/SUNWscxvm/bin/control_xvm \
 49 -R '${RS}' -G '${RG}' -D '${DOMAIN}' -P '${DOMAIN_PATHNAME}' -M '${FAILOVER}' stop " \
 50 -p Probe_command="/opt/SUNWscxvm/bin/control_xvm \
 51 -R '${RS}' -G '${RG}' -D '${DOMAIN}' -P '${DOMAIN_PATHNAME}' -M '${FAILOVER}' probe " \
 52 -p Validate_command="/opt/SUNWscxvm/bin/control_xvm \
 53 -R '${RS}' -G '${RG}' -D '${DOMAIN}' -P '${DOMAIN_PATHNAME}' -M '${FAILOVER}' validate " \
 54 -p Port_list=23/tcp -p Stop_signal=9 -p Stop_timeout=600 \
 55 -y Resource_dependencies=${HAS_RS} \
 56 ${RS}
 57 
 58 exit $?