1*26d8ba22Sgarypen#!/sbin/sh 2*26d8ba22Sgarypen# 3*26d8ba22Sgarypen# CDDL HEADER START 4*26d8ba22Sgarypen# 5*26d8ba22Sgarypen# The contents of this file are subject to the terms of the 6*26d8ba22Sgarypen# Common Development and Distribution License (the "License"). 7*26d8ba22Sgarypen# You may not use this file except in compliance with the License. 8*26d8ba22Sgarypen# 9*26d8ba22Sgarypen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*26d8ba22Sgarypen# or http://www.opensolaris.org/os/licensing. 11*26d8ba22Sgarypen# See the License for the specific language governing permissions 12*26d8ba22Sgarypen# and limitations under the License. 13*26d8ba22Sgarypen# 14*26d8ba22Sgarypen# When distributing Covered Code, include this CDDL HEADER in each 15*26d8ba22Sgarypen# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*26d8ba22Sgarypen# If applicable, add the following below this CDDL HEADER, with the 17*26d8ba22Sgarypen# fields enclosed by brackets "[]" replaced with your own identifying 18*26d8ba22Sgarypen# information: Portions Copyright [yyyy] [name of copyright owner] 19*26d8ba22Sgarypen# 20*26d8ba22Sgarypen# CDDL HEADER END 21*26d8ba22Sgarypen# 22*26d8ba22Sgarypen# 23*26d8ba22Sgarypen# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*26d8ba22Sgarypen# Use is subject to license terms. 25*26d8ba22Sgarypen# 26*26d8ba22Sgarypen# ident "%Z%%M% %I% %E% SMI" 27*26d8ba22Sgarypen# 28*26d8ba22Sgarypen# Method script for the pools service. 29*26d8ba22Sgarypen# 30*26d8ba22Sgarypen 31*26d8ba22Sgarypen. /lib/svc/share/smf_include.sh 32*26d8ba22Sgarypen 33*26d8ba22Sgarypencheck_requirements () { 34*26d8ba22Sgarypen if [ ! -x /sbin/zonename ] || [ ! -x /usr/lib/pool/poold ] || 35*26d8ba22Sgarypen [ "${_INIT_ZONENAME:=`/sbin/zonename`}" != "global" ]; then 36*26d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 37*26d8ba22Sgarypen fi 38*26d8ba22Sgarypen} 39*26d8ba22Sgarypen 40*26d8ba22Sgarypencheck_requirements 41*26d8ba22Sgarypencase "$1" in 42*26d8ba22Sgarypen'start') 43*26d8ba22Sgarypen /usr/lib/pool/poold 44*26d8ba22Sgarypen if [ $? -ne 0 ]; then 45*26d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 46*26d8ba22Sgarypen fi 47*26d8ba22Sgarypen ;; 48*26d8ba22Sgarypen*) 49*26d8ba22Sgarypen echo "Usage: $0 { start }" 50*26d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 51*26d8ba22Sgarypen ;; 52*26d8ba22Sgarypenesac 53*26d8ba22Sgarypen 54*26d8ba22Sgarypenexit $SMF_EXIT_OK 55