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