xref: /onnv-gate/usr/src/cmd/lvm/md_monitord/svc-mdmonitor.sh (revision 2589:bab6bd68d0e5)
10Sstevel@tonic-gate#!/bin/sh
20Sstevel@tonic-gate#
30Sstevel@tonic-gate# CDDL HEADER START
40Sstevel@tonic-gate#
50Sstevel@tonic-gate# The contents of this file are subject to the terms of the
62150Sjeanm# Common Development and Distribution License (the "License").
72150Sjeanm# You may not use this file except in compliance with the License.
80Sstevel@tonic-gate#
90Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate# See the License for the specific language governing permissions
120Sstevel@tonic-gate# and limitations under the License.
130Sstevel@tonic-gate#
140Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate#
200Sstevel@tonic-gate# CDDL HEADER END
210Sstevel@tonic-gate#
220Sstevel@tonic-gate#
232150Sjeanm# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate#
280Sstevel@tonic-gate# Start mdmonitord.
290Sstevel@tonic-gate
300Sstevel@tonic-gateMDMONITORD=/usr/sbin/mdmonitord
310Sstevel@tonic-gate
320Sstevel@tonic-gate. /lib/svc/share/smf_include.sh
330Sstevel@tonic-gate
340Sstevel@tonic-gateif [ ! -x $MDMONITORD ]; then
350Sstevel@tonic-gate	echo "$MDMONITORD is missing or not executable."
360Sstevel@tonic-gate	exit $SMF_EXIT_ERR_CONFIG
370Sstevel@tonic-gatefi
380Sstevel@tonic-gate
390Sstevel@tonic-gate$MDMONITORD
400Sstevel@tonic-gateerror=$?
410Sstevel@tonic-gatecase $error in
420Sstevel@tonic-gate0)	exit 0
430Sstevel@tonic-gate	;;
440Sstevel@tonic-gate
450Sstevel@tonic-gate*)	echo "Could not start $MDMONITORD. Error $error."
46*2589Shshaw	exit $SMF_EXIT_ERR_FATAL
470Sstevel@tonic-gate	;;
480Sstevel@tonic-gateesac
49