126d8ba22Sgarypen#!/sbin/sh 226d8ba22Sgarypen# 326d8ba22Sgarypen# CDDL HEADER START 426d8ba22Sgarypen# 526d8ba22Sgarypen# The contents of this file are subject to the terms of the 626d8ba22Sgarypen# Common Development and Distribution License (the "License"). 726d8ba22Sgarypen# You may not use this file except in compliance with the License. 826d8ba22Sgarypen# 926d8ba22Sgarypen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 1026d8ba22Sgarypen# or http://www.opensolaris.org/os/licensing. 1126d8ba22Sgarypen# See the License for the specific language governing permissions 1226d8ba22Sgarypen# and limitations under the License. 1326d8ba22Sgarypen# 1426d8ba22Sgarypen# When distributing Covered Code, include this CDDL HEADER in each 1526d8ba22Sgarypen# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1626d8ba22Sgarypen# If applicable, add the following below this CDDL HEADER, with the 1726d8ba22Sgarypen# fields enclosed by brackets "[]" replaced with your own identifying 1826d8ba22Sgarypen# information: Portions Copyright [yyyy] [name of copyright owner] 1926d8ba22Sgarypen# 2026d8ba22Sgarypen# CDDL HEADER END 2126d8ba22Sgarypen# 2226d8ba22Sgarypen# 23*6927f468Sdp# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2426d8ba22Sgarypen# Use is subject to license terms. 2526d8ba22Sgarypen# 2626d8ba22Sgarypen# ident "%Z%%M% %I% %E% SMI" 2726d8ba22Sgarypen# 2826d8ba22Sgarypen# Method script for the pools service. 2926d8ba22Sgarypen# 3026d8ba22Sgarypen 3126d8ba22Sgarypen. /lib/svc/share/smf_include.sh 3226d8ba22Sgarypen 33*6927f468Sdpif [ ! -x /usr/lib/pool/poold ]; then 34*6927f468Sdp echo "/usr/lib/pool/poold not found or not executable" 3526d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 3626d8ba22Sgarypenfi 3726d8ba22Sgarypen 38*6927f468Sdpif smf_is_nonglobalzone; then 39*6927f468Sdp echo "poold cannot be run in non-global zones" 40*6927f468Sdp exit $SMF_EXIT_ERR_FATAL 41*6927f468Sdpfi 42*6927f468Sdp 4326d8ba22Sgarypencase "$1" in 4426d8ba22Sgarypen'start') 4526d8ba22Sgarypen /usr/lib/pool/poold 46*6927f468Sdp err=$? 47*6927f468Sdp if [ $err -ne 0 ]; then 48*6927f468Sdp echo "poold failed to start: error $err" 4926d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 5026d8ba22Sgarypen fi 5126d8ba22Sgarypen ;; 5226d8ba22Sgarypen*) 5326d8ba22Sgarypen echo "Usage: $0 { start }" 5426d8ba22Sgarypen exit $SMF_EXIT_ERR_FATAL 5526d8ba22Sgarypen ;; 5626d8ba22Sgarypenesac 5726d8ba22Sgarypen 5826d8ba22Sgarypenexit $SMF_EXIT_OK 59