xref: /onnv-gate/usr/src/cmd/rmvolmgr/svc-rmvolmgr (revision 2912:85ea316d9c18)
1*2912Sartem#!/sbin/sh
2*2912Sartem#
3*2912Sartem# CDDL HEADER START
4*2912Sartem#
5*2912Sartem# The contents of this file are subject to the terms of the
6*2912Sartem# Common Development and Distribution License (the "License").
7*2912Sartem# You may not use this file except in compliance with the License.
8*2912Sartem#
9*2912Sartem# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*2912Sartem# or http://www.opensolaris.org/os/licensing.
11*2912Sartem# See the License for the specific language governing permissions
12*2912Sartem# and limitations under the License.
13*2912Sartem#
14*2912Sartem# When distributing Covered Code, include this CDDL HEADER in each
15*2912Sartem# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*2912Sartem# If applicable, add the following below this CDDL HEADER, with the
17*2912Sartem# fields enclosed by brackets "[]" replaced with your own identifying
18*2912Sartem# information: Portions Copyright [yyyy] [name of copyright owner]
19*2912Sartem#
20*2912Sartem# CDDL HEADER END
21*2912Sartem#
22*2912Sartem# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*2912Sartem# Use is subject to license terms.
24*2912Sartem#
25*2912Sartem# ident	"%Z%%M%	%I%	%E% SMI"
26*2912Sartem
27*2912Sartem. /lib/svc/share/smf_include.sh
28*2912Sartem
29*2912Sartemcase "$1" in
30*2912Sartem'start')
31*2912Sartem        if smf_is_nonglobalzone; then
32*2912Sartem                /usr/sbin/svcadm disable $SMF_FMRI
33*2912Sartem                echo "$SMF_FMRI is not supported in a local zone"
34*2912Sartem                sleep 5 &
35*2912Sartem                exit $SMF_EXIT_OK
36*2912Sartem        fi
37*2912Sartem
38*2912Sartem	[ ! -x /usr/lib/rmvolmgr ] && exit $SMF_EXIT_ERR_CONFIG
39*2912Sartem
40*2912Sartem	/usr/lib/rmvolmgr -s
41*2912Sartem	err=$?
42*2912Sartem	if [ $err -ne 0 ]; then
43*2912Sartem		echo "rmvolmgr failed to start: error $err"
44*2912Sartem		exit $SMF_EXIT_ERR_FATAL
45*2912Sartem	fi
46*2912Sartem	;;
47*2912Sartem
48*2912Sartem*)
49*2912Sartem        echo "Usage: $0 { start }"
50*2912Sartem	exit $SMF_EXIT_ERR_FATAL
51*2912Sartem        ;;
52*2912Sartem
53*2912Sartem
54*2912Sartemesac
55*2912Sartem
56*2912Sartemexit $SMF_EXIT_OK
57