svc-poold revision 26d8ba2242584067b65160d24193c37cdc83cd55
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco#!/sbin/sh
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco#
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco# CDDL HEADER START
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen#
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen# The contents of this file are subject to the terms of the
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen# Common Development and Distribution License (the "License").
551b849ce88d596dc52dda2f78229a932b339c78Lubos Kosco# You may not use this file except in compliance with the License.
551b849ce88d596dc52dda2f78229a932b339c78Lubos Kosco#
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# or http://www.opensolaris.org/os/licensing.
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# See the License for the specific language governing permissions
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# and limitations under the License.
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco# When distributing Covered Code, include this CDDL HEADER in each
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bcae302a5f4b516d2f3c05f657df054e1a0efde7Knut Anders Hatlen# If applicable, add the following below this CDDL HEADER, with the
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# fields enclosed by brackets "[]" replaced with your own identifying
98774b0b90e4da0f3f2c5e4856bcbbf366ed0fe0Knut Anders Hatlen# information: Portions Copyright [yyyy] [name of copyright owner]
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# CDDL HEADER END
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
afb218f076cae538126a5f931299a82a114a075aKnut Anders Hatlen# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# Use is subject to license terms.
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# ident "%Z%%M% %I% %E% SMI"
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye# Method script for the pools service.
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye#
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye. /lib/svc/share/smf_include.sh
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Koscocheck_requirements () {
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye if [ ! -x /sbin/zonename ] || [ ! -x /usr/lib/pool/poold ] ||
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen [ "${_INIT_ZONENAME:=`/sbin/zonename`}" != "global" ]; then
bbb39d08c0e5b73c89ba813a7c1789842c60f961Lubos Kosco exit $SMF_EXIT_ERR_FATAL
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye fi
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco}
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbyecheck_requirements
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbyecase "$1" in
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye'start')
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye /usr/lib/pool/poold
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye if [ $? -ne 0 ]; then
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye exit $SMF_EXIT_ERR_FATAL
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye fi
9661674ed58ba62a40e43d1a4b38d5e77c3c6545Knut Anders Hatlen ;;
bbb39d08c0e5b73c89ba813a7c1789842c60f961Lubos Kosco*)
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye echo "Usage: $0 { start }"
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye exit $SMF_EXIT_ERR_FATAL
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbye ;;
a1318a82916028f363b3c5b52e7fd7256b632497Trond Norbyeesac
ca37bb3c4127b35d333203398bd983ee730d9da5Jan S Berg
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Koscoexit $SMF_EXIT_OK
a458f50391086e92efb1275d8848ff3b83237abeKnut Anders Hatlen