xref: /titanic_41/usr/src/cmd/lms/svc-lms (revision 617e2443dfc17fe44fd44c0675d6aad2ffc9df42)
1*617e2443SMark Logan#!/sbin/sh
2*617e2443SMark Logan#
3*617e2443SMark Logan# CDDL HEADER START
4*617e2443SMark Logan#
5*617e2443SMark Logan# The contents of this file are subject to the terms of the
6*617e2443SMark Logan# Common Development and Distribution License (the "License").
7*617e2443SMark Logan# You may not use this file except in compliance with the License.
8*617e2443SMark Logan#
9*617e2443SMark Logan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*617e2443SMark Logan# or http://www.opensolaris.org/os/licensing.
11*617e2443SMark Logan# See the License for the specific language governing permissions
12*617e2443SMark Logan# and limitations under the License.
13*617e2443SMark Logan#
14*617e2443SMark Logan# When distributing Covered Code, include this CDDL HEADER in each
15*617e2443SMark Logan# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*617e2443SMark Logan# If applicable, add the following below this CDDL HEADER, with the
17*617e2443SMark Logan# fields enclosed by brackets "[]" replaced with your own identifying
18*617e2443SMark Logan# information: Portions Copyright [yyyy] [name of copyright owner]
19*617e2443SMark Logan#
20*617e2443SMark Logan# CDDL HEADER END
21*617e2443SMark Logan#
22*617e2443SMark Logan#
23*617e2443SMark Logan# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*617e2443SMark Logan# Use is subject to license terms.
25*617e2443SMark Logan#
26*617e2443SMark Logan
27*617e2443SMark Logan. /lib/svc/share/smf_include.sh
28*617e2443SMark Logan
29*617e2443SMark Logan[ ! -x /usr/lib/lms ] && exit $SMF_EXIT_ERR_CONFIG
30*617e2443SMark Logan
31*617e2443SMark Logan# Check for an lms process and exit
32*617e2443SMark Logan# if the daemon is already running.
33*617e2443SMark Logan
34*617e2443SMark Loganif /usr/bin/pgrep -x -u 0 -z `smf_zonename` lms >/dev/null 2>&1; then
35*617e2443SMark Logan	echo "$0: lms is already running"
36*617e2443SMark Logan	exit 1
37*617e2443SMark Loganfi
38*617e2443SMark Logan
39*617e2443SMark Logan/usr/lib/lms &
40