volmgt revision 7c478bd95313f5f23a4c958a745db2134aa03244
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#!/sbin/sh
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews#
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews# CDDL HEADER START
72cbea34c935116215846c88a94a3c21ec8c1827Mark Andrews#
4e3c7a22ea3219f680e09540ee12bb326fc2ccedMark Andrews# The contents of this file are subject to the terms of the
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# Common Development and Distribution License, Version 1.0 only
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews# (the "License"). You may not use this file except in compliance
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# with the License.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# Use is subject to license terms.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# ident "%Z%%M% %I% %E% SMI"
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoncase "$1" in
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews'start')
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if [ -f /etc/vold.conf -a -f /usr/sbin/vold -a \
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews "${_INIT_ZONENAME:=`/sbin/zonename`}" = "global" ]; then
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews echo 'volume management starting.'
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews /usr/sbin/vold >/dev/msglog 2>&1 &
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews fi
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews ;;
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews'stop')
4038ab55037184d76153afd3c469aa8c85adf85dMark Andrews /usr/bin/pkill -x -u 0 -z ${_INIT_ZONENAME:=`/sbin/zonename`} vold
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews ;;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews*)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews echo "Usage: $0 { start | stop }"
ede29aeb412c5448ab9a2028763ae08e7887ca74Mark Andrews exit 1
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews ;;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrewsesac
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonexit 0
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews