xref: /titanic_52/usr/src/cmd/zonestat/zonestatd/svc-zonestat (revision efd4c9b63ad77503c101fc6c2ed8ba96c9d52964)
1*efd4c9b6SSteve Lawrence#!/bin/sh
2*efd4c9b6SSteve Lawrence#
3*efd4c9b6SSteve Lawrence# CDDL HEADER START
4*efd4c9b6SSteve Lawrence#
5*efd4c9b6SSteve Lawrence# The contents of this file are subject to the terms of the
6*efd4c9b6SSteve Lawrence# Common Development and Distribution License (the "License").
7*efd4c9b6SSteve Lawrence# You may not use this file except in compliance with the License.
8*efd4c9b6SSteve Lawrence#
9*efd4c9b6SSteve Lawrence# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*efd4c9b6SSteve Lawrence# or http://www.opensolaris.org/os/licensing.
11*efd4c9b6SSteve Lawrence# See the License for the specific language governing permissions
12*efd4c9b6SSteve Lawrence# and limitations under the License.
13*efd4c9b6SSteve Lawrence#
14*efd4c9b6SSteve Lawrence# When distributing Covered Code, include this CDDL HEADER in each
15*efd4c9b6SSteve Lawrence# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*efd4c9b6SSteve Lawrence# If applicable, add the following below this CDDL HEADER, with the
17*efd4c9b6SSteve Lawrence# fields enclosed by brackets "[]" replaced with your own identifying
18*efd4c9b6SSteve Lawrence# information: Portions Copyright [yyyy] [name of copyright owner]
19*efd4c9b6SSteve Lawrence#
20*efd4c9b6SSteve Lawrence# CDDL HEADER END
21*efd4c9b6SSteve Lawrence#
22*efd4c9b6SSteve Lawrence#
23*efd4c9b6SSteve Lawrence# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24*efd4c9b6SSteve Lawrence#
25*efd4c9b6SSteve Lawrence
26*efd4c9b6SSteve Lawrence. /lib/svc/share/smf_include.sh
27*efd4c9b6SSteve Lawrencemode=$1
28*efd4c9b6SSteve Lawrence
29*efd4c9b6SSteve Lawrencecase "$mode" in
30*efd4c9b6SSteve Lawrence'stop')
31*efd4c9b6SSteve Lawrence	smf_kill_contract $2 TERM
32*efd4c9b6SSteve Lawrence	/usr/lib/zones/zonestatd -c
33*efd4c9b6SSteve Lawrence	exit $SMF_EXIT_OK
34*efd4c9b6SSteve Lawrence	;;
35*efd4c9b6SSteve Lawrence*)
36*efd4c9b6SSteve Lawrence	exit $SMF_EXIT_ERR_FATAL
37*efd4c9b6SSteve Lawrence	;;
38*efd4c9b6SSteve Lawrenceesac
39*efd4c9b6SSteve Lawrence
40*efd4c9b6SSteve Lawrenceexit $SMF_EXIT_ERR_FATAL
41*efd4c9b6SSteve Lawrence
42