svc-utmpd revision 7c478bd95313f5f23a4c958a745db2134aa03244
5403N/A#!/sbin/sh
5403N/A#
5717N/A# CDDL HEADER START
5403N/A#
5403N/A# The contents of this file are subject to the terms of the
5403N/A# Common Development and Distribution License, Version 1.0 only
5403N/A# (the "License"). You may not use this file except in compliance
5403N/A# with the License.
5403N/A#
5403N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5403N/A# or http://www.opensolaris.org/os/licensing.
5403N/A# See the License for the specific language governing permissions
5403N/A# and limitations under the License.
5403N/A#
5403N/A# When distributing Covered Code, include this CDDL HEADER in each
5403N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5403N/A# If applicable, add the following below this CDDL HEADER, with the
5403N/A# fields enclosed by brackets "[]" replaced with your own identifying
5403N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5403N/A#
5403N/A# CDDL HEADER END
5403N/A#
5403N/A#
5403N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5403N/A# Use is subject to license terms.
5403N/A#
5403N/A# ident "%Z%%M% %I% %E% SMI"
5403N/A
6853N/A. /lib/svc/share/smf_include.sh
6853N/A
6853N/A[ ! -x /usr/lib/utmpd ] && exit $SMF_EXIT_ERR_CONFIG
5403N/A
6853N/A# If a utmppipe exists, check for a utmpd process and exit
6853N/A# if the daemon is already running.
6853N/A
6853N/Aif [ -p /etc/utmppipe ]; then
6853N/A ZONENAME=`/sbin/zonename`
6853N/A if /usr/bin/pgrep -x -u 0 -z $ZONENAME utmpd >/dev/null 2>&1; then
6853N/A echo "$0: utmpd is already running"
6853N/A exit 1
5403N/A fi
5403N/Afi
5717N/A
6853N/A/usr/bin/rm -f /etc/utmppipe
6853N/A/usr/lib/utmpd &
6853N/A