svc-poold revision 6927f468b0af7710df000f6b16f6ee413e1e3007
213N/A#!/sbin/sh
213N/A#
213N/A# CDDL HEADER START
213N/A#
213N/A# The contents of this file are subject to the terms of the
213N/A# Common Development and Distribution License (the "License").
213N/A# You may not use this file except in compliance with the License.
213N/A#
213N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
213N/A# or http://www.opensolaris.org/os/licensing.
213N/A# See the License for the specific language governing permissions
213N/A# and limitations under the License.
213N/A#
213N/A# When distributing Covered Code, include this CDDL HEADER in each
213N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
213N/A# If applicable, add the following below this CDDL HEADER, with the
213N/A# fields enclosed by brackets "[]" replaced with your own identifying
213N/A# information: Portions Copyright [yyyy] [name of copyright owner]
213N/A#
213N/A# CDDL HEADER END
213N/A#
213N/A#
3661N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
213N/A# Use is subject to license terms.
213N/A#
213N/A# ident "%Z%%M% %I% %E% SMI"
213N/A#
213N/A# Method script for the pools service.
213N/A#
213N/A
213N/A. /lib/svc/share/smf_include.sh
844N/A
844N/Aif [ ! -x /usr/lib/pool/poold ]; then
213N/A echo "/usr/lib/pool/poold not found or not executable"
213N/A exit $SMF_EXIT_ERR_FATAL
213N/Afi
1273N/A
213N/Aif smf_is_nonglobalzone; then
3661N/A echo "poold cannot be run in non-global zones"
3661N/A exit $SMF_EXIT_ERR_FATAL
213N/Afi
213N/A
213N/Acase "$1" in
213N/A'start')
213N/A /usr/lib/pool/poold
213N/A err=$?
213N/A if [ $err -ne 0 ]; then
213N/A echo "poold failed to start: error $err"
213N/A exit $SMF_EXIT_ERR_FATAL
213N/A fi
213N/A ;;
213N/A*)
213N/A echo "Usage: $0 { start }"
213N/A exit $SMF_EXIT_ERR_FATAL
213N/A ;;
213N/Aesac
213N/A
213N/Aexit $SMF_EXIT_OK
213N/A