xref: /illumos-gate/usr/src/cmd/intrd/svc-intrd (revision bd335c64)
1*bd335c64Sesolom#!/sbin/sh
2*bd335c64Sesolom#
3*bd335c64Sesolom# CDDL HEADER START
4*bd335c64Sesolom#
5*bd335c64Sesolom# The contents of this file are subject to the terms of the
6*bd335c64Sesolom# Common Development and Distribution License, Version 1.0 only
7*bd335c64Sesolom# (the "License").  You may not use this file except in compliance
8*bd335c64Sesolom# with the License.
9*bd335c64Sesolom#
10*bd335c64Sesolom# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11*bd335c64Sesolom# or http://www.opensolaris.org/os/licensing.
12*bd335c64Sesolom# See the License for the specific language governing permissions
13*bd335c64Sesolom# and limitations under the License.
14*bd335c64Sesolom#
15*bd335c64Sesolom# When distributing Covered Code, include this CDDL HEADER in each
16*bd335c64Sesolom# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17*bd335c64Sesolom# If applicable, add the following below this CDDL HEADER, with the
18*bd335c64Sesolom# fields enclosed by brackets "[]" replaced with your own identifying
19*bd335c64Sesolom# information: Portions Copyright [yyyy] [name of copyright owner]
20*bd335c64Sesolom#
21*bd335c64Sesolom# CDDL HEADER END
22*bd335c64Sesolom#
23*bd335c64Sesolom
24*bd335c64Sesolom#
25*bd335c64Sesolom# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26*bd335c64Sesolom# Use is subject to license terms.
27*bd335c64Sesolom#
28*bd335c64Sesolom# ident	"%Z%%M%	%I%	%E% SMI"
29*bd335c64Sesolom
30*bd335c64Sesolom. /lib/svc/share/smf_include.sh
31*bd335c64Sesolom
32*bd335c64Sesolom# Don't start intrd if intrd can't be found or if intrd is already running.
33*bd335c64Sesolom
34*bd335c64Sesolomif [ ! -f /usr/lib/intrd ]; then
35*bd335c64Sesolom	echo "$0: intrd daemon not installed"
36*bd335c64Sesolom	exit $SMF_EXIT_ERR_CONFIG
37*bd335c64Sesolomfi
38*bd335c64Sesolom
39*bd335c64Sesolomif /usr/bin/pgrep -x -z global intrd >/dev/null; then
40*bd335c64Sesolom	echo "$0: intrd is already running"
41*bd335c64Sesolom	exit $SMF_EXIT_ERR_FATAL
42*bd335c64Sesolomfi
43*bd335c64Sesolom
44*bd335c64Sesolom/usr/lib/intrd &
45