svc-rmvolmgr revision 18c2aff776a775d34a4c9893a4c72e0434d68e36
7de06b566fc99472d2c275313a73e671d6a67146bnicholes#!/sbin/sh
7de06b566fc99472d2c275313a73e671d6a67146bnicholes#
7de06b566fc99472d2c275313a73e671d6a67146bnicholes# CDDL HEADER START
7de06b566fc99472d2c275313a73e671d6a67146bnicholes#
bf606039f49dbee2b9b9b6f5d08e0abd7a3820adbnicholes# The contents of this file are subject to the terms of the
7de06b566fc99472d2c275313a73e671d6a67146bnicholes# Common Development and Distribution License (the "License").
dc110396bf26739d1515de5a7b95694dad624973bnicholes# You may not use this file except in compliance with the License.
dc110396bf26739d1515de5a7b95694dad624973bnicholes#
dc110396bf26739d1515de5a7b95694dad624973bnicholes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dc110396bf26739d1515de5a7b95694dad624973bnicholes# or http://www.opensolaris.org/os/licensing.
dc110396bf26739d1515de5a7b95694dad624973bnicholes# See the License for the specific language governing permissions
dc110396bf26739d1515de5a7b95694dad624973bnicholes# and limitations under the License.
dc110396bf26739d1515de5a7b95694dad624973bnicholes#
dc110396bf26739d1515de5a7b95694dad624973bnicholes# When distributing Covered Code, include this CDDL HEADER in each
dc110396bf26739d1515de5a7b95694dad624973bnicholes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes# If applicable, add the following below this CDDL HEADER, with the
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes# fields enclosed by brackets "[]" replaced with your own identifying
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes# information: Portions Copyright [yyyy] [name of copyright owner]
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes#
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes# CDDL HEADER END
76b2acef831fc5bede20204020d0ae6356633fc2bnicholes#
f938882c25c57b6eb89c718177f45ea45a1d603cbnicholes# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7de06b566fc99472d2c275313a73e671d6a67146bnicholes# Use is subject to license terms.
7de06b566fc99472d2c275313a73e671d6a67146bnicholes#
7de06b566fc99472d2c275313a73e671d6a67146bnicholes# ident "%Z%%M% %I% %E% SMI"
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes. /lib/svc/share/smf_include.sh
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes
1186d2bf31474111e7503d30ce82292f59fea04bbnicholescase "$1" in
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes'start')
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes if smf_is_nonglobalzone; then
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes /usr/sbin/svcadm disable $SMF_FMRI
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes echo "$SMF_FMRI is not supported in a local zone"
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes sleep 5 &
1186d2bf31474111e7503d30ce82292f59fea04bbnicholes exit $SMF_EXIT_OK
7de06b566fc99472d2c275313a73e671d6a67146bnicholes fi
7de06b566fc99472d2c275313a73e671d6a67146bnicholes
7de06b566fc99472d2c275313a73e671d6a67146bnicholes [ ! -x /usr/lib/rmvolmgr ] && exit $SMF_EXIT_ERR_CONFIG
7de06b566fc99472d2c275313a73e671d6a67146bnicholes
7de06b566fc99472d2c275313a73e671d6a67146bnicholes /usr/lib/rmvolmgr -s
7de06b566fc99472d2c275313a73e671d6a67146bnicholes err=$?
7de06b566fc99472d2c275313a73e671d6a67146bnicholes if [ $err -ne 0 ]; then
c9ce2b84cc0bf2caa39be615eb06f7a9b68378d5bnicholes echo "rmvolmgr failed to start: error $err"
7de06b566fc99472d2c275313a73e671d6a67146bnicholes exit $SMF_EXIT_ERR_FATAL
7de06b566fc99472d2c275313a73e671d6a67146bnicholes fi
33d4e63384b608406b61951d631490b3451e9a57bnicholes ;;
33d4e63384b608406b61951d631490b3451e9a57bnicholes
33d4e63384b608406b61951d631490b3451e9a57bnicholes*)
7de06b566fc99472d2c275313a73e671d6a67146bnicholes echo "Usage: $0 { start }"
7de06b566fc99472d2c275313a73e671d6a67146bnicholes exit $SMF_EXIT_ERR_FATAL
7de06b566fc99472d2c275313a73e671d6a67146bnicholes ;;
7de06b566fc99472d2c275313a73e671d6a67146bnicholes
7de06b566fc99472d2c275313a73e671d6a67146bnicholes
7de06b566fc99472d2c275313a73e671d6a67146bnicholesesac
7de06b566fc99472d2c275313a73e671d6a67146bnicholes
7de06b566fc99472d2c275313a73e671d6a67146bnicholesexit $SMF_EXIT_OK
7de06b566fc99472d2c275313a73e671d6a67146bnicholes