postinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
346N/A#
346N/A# CDDL HEADER START
1276N/A#
346N/A# The contents of this file are subject to the terms of the
1549N/A# Common Development and Distribution License, Version 1.0 only
346N/A# (the "License"). You may not use this file except in compliance
346N/A# with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A
919N/A#
919N/A#ident "%Z%%M% %I% %E% SMI"
346N/A#
346N/A# Copyright (c) 1993 by Sun Microsystems, Inc.
346N/A#
346N/A#
493N/A# install crontab file for uucp
346N/A# use crontab command if cron is running
970N/A# do nothing in the context of adding services to a multi-release server
970N/A# (in this context there is no corresponding root partition)
970N/A#
970N/A# Also because the default crontab now disables UUCP activity,
1356N/A# check for UUCP configuration, and don't do the install if
1356N/A# found. Note this only effects upgrades.
1356N/A
346N/Aps -e | egrep -s ' cron$'
1549N/ACRONRUNNING=$?
346N/A
911N/ACRONTABSRC=$BASEDIR/usr/lib/uucp/uudemon.crontab
1549N/ACRONTABDIR=$BASEDIR/var/spool/cron/crontabs
1549N/ACRONTABDEST=$CRONTABDIR/uucp
1549N/A
911N/A# Newly installed systems have only comments in the /etc/uucp/Systems
346N/A# file. So if there is any content, then this is an upgrade with
1276N/A# UUCP configured, and thus we don't want to clobber their crontab.
1068N/Agrep -v '^#' $BASEDIR/etc/uucp/Systems >/dev/null 2>&1 && exit 0
1068N/A
1068N/Aif [ \( $CRONRUNNING -eq 0 \) -a \( "$BASEDIR" = "/" \) ]
1068N/Athen
1068N/A su uucp -c "crontab $CRONTABSRC"
1068N/Aelse
1549N/A if [ -d $CRONTABDIR ]
1549N/A then
346N/A rm -f $CRONTABDEST
346N/A cp $CRONTABSRC $CRONTABDEST
1276N/A chgrp sys $CRONTABDEST
493N/A chmod 400 $CRONTABDEST
346N/A fi
970N/Afi
970N/A
970N/Aexit 0
346N/A