1*3247Sgjelinek#!/sbin/sh 2*3247Sgjelinek# 3*3247Sgjelinek# CDDL HEADER START 4*3247Sgjelinek# 5*3247Sgjelinek# The contents of this file are subject to the terms of the 6*3247Sgjelinek# Common Development and Distribution License (the "License"). 7*3247Sgjelinek# You may not use this file except in compliance with the License. 8*3247Sgjelinek# 9*3247Sgjelinek# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*3247Sgjelinek# or http://www.opensolaris.org/os/licensing. 11*3247Sgjelinek# See the License for the specific language governing permissions 12*3247Sgjelinek# and limitations under the License. 13*3247Sgjelinek# 14*3247Sgjelinek# When distributing Covered Code, include this CDDL HEADER in each 15*3247Sgjelinek# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*3247Sgjelinek# If applicable, add the following below this CDDL HEADER, with the 17*3247Sgjelinek# fields enclosed by brackets "[]" replaced with your own identifying 18*3247Sgjelinek# information: Portions Copyright [yyyy] [name of copyright owner] 19*3247Sgjelinek# 20*3247Sgjelinek# CDDL HEADER END 21*3247Sgjelinek# 22*3247Sgjelinek# 23*3247Sgjelinek# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*3247Sgjelinek# Use is subject to license terms. 25*3247Sgjelinek 26*3247Sgjelinek# ident "%Z%%M% %I% %E% SMI" 27*3247Sgjelinek# 28*3247Sgjelinek 29*3247Sgjelinek. /lib/svc/share/smf_include.sh 30*3247Sgjelinek 31*3247Sgjelinek[ ! -f /etc/zones/global.xml ] && exit $SMF_EXIT_OK # No global zone 32*3247Sgjelinek # resource mgmt. 33*3247Sgjelinek # configuration 34*3247Sgjelinek 35*3247Sgjelinek[ ! -x /usr/sbin/zoneadm ] && exit $SMF_EXIT_OK # SUNWzoneu not installed 36*3247Sgjelinek 37*3247Sgjelinek# Make sure working directory is / to prevent unmounting problems. 38*3247Sgjelinekcd / 39*3247SgjelinekPATH=/usr/sbin:/usr/bin; export PATH 40*3247Sgjelinek 41*3247Sgjelinekcase "$1" in 42*3247Sgjelinek'start') 43*3247Sgjelinek zoneadm -z global apply 44*3247Sgjelinek if [ $? -ne 0 ]; then 45*3247Sgjelinek exit $SMF_EXIT_ERR_FATAL 46*3247Sgjelinek fi 47*3247Sgjelinek ;; 48*3247Sgjelinek 49*3247Sgjelinek*) 50*3247Sgjelinek echo "Usage: $0 start" 51*3247Sgjelinek exit $SMF_EXIT_ERR_FATAL 52*3247Sgjelinek ;; 53*3247Sgjelinekesac 54*3247Sgjelinekexit $SMF_EXIT_OK 55