svc-resource-mgmt revision 0209230bf1261579beab4f55226bb509e6b850cb
236N/A#!/sbin/sh
236N/A#
236N/A# CDDL HEADER START
236N/A#
236N/A# The contents of this file are subject to the terms of the
236N/A# Common Development and Distribution License (the "License").
236N/A# You may not use this file except in compliance with the License.
236N/A#
236N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
236N/A# or http://www.opensolaris.org/os/licensing.
236N/A# See the License for the specific language governing permissions
236N/A# and limitations under the License.
236N/A#
236N/A# When distributing Covered Code, include this CDDL HEADER in each
236N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
236N/A# If applicable, add the following below this CDDL HEADER, with the
236N/A# fields enclosed by brackets "[]" replaced with your own identifying
236N/A# information: Portions Copyright [yyyy] [name of copyright owner]
236N/A#
236N/A# CDDL HEADER END
236N/A#
236N/A#
236N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
236N/A# Use is subject to license terms.
236N/A
236N/A# ident "%Z%%M% %I% %E% SMI"
236N/A#
236N/A
236N/A. /lib/svc/share/smf_include.sh
236N/A
236N/A[ ! -f /etc/zones/global.xml ] && exit $SMF_EXIT_OK # No global zone
236N/A # resource mgmt.
236N/A # configuration
236N/A
236N/A[ ! -x /usr/sbin/zoneadm ] && exit $SMF_EXIT_OK # SUNWzoneu not installed
236N/A
236N/A# Make sure working directory is / to prevent unmounting problems.
236N/Acd /
236N/APATH=/usr/sbin:/usr/bin; export PATH
236N/A
236N/Acase "$1" in
236N/A'start')
236N/A zoneadm -z global apply
236N/A if [ $? -ne 0 ]; then
236N/A exit $SMF_EXIT_ERR_FATAL
236N/A fi
236N/A ;;
236N/A
236N/A*)
236N/A echo "Usage: $0 start"
236N/A exit $SMF_EXIT_ERR_FATAL
236N/A ;;
236N/Aesac
236N/Aexit $SMF_EXIT_OK
236N/A