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