1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License, Version 1.0 only 6 # (the "License"). You may not use this file except in compliance 7 # with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 23 # 24 #ident "%Z%%M% %I% %E% SMI" 25 # 26 # Copyright (c) 1993 by Sun Microsystems, Inc. 27 # 28 # 29 # install crontab file for uucp 30 # use crontab command if cron is running 31 # do nothing in the context of adding services to a multi-release server 32 # (in this context there is no corresponding root partition) 33 # 34 # Also because the default crontab now disables UUCP activity, 35 # check for UUCP configuration, and don't do the install if 36 # found. Note this only effects upgrades. 37 38 ps -e | egrep -s ' cron$' 39 CRONRUNNING=$? 40 41 CRONTABSRC=$BASEDIR/usr/lib/uucp/uudemon.crontab 42 CRONTABDIR=$BASEDIR/var/spool/cron/crontabs 43 CRONTABDEST=$CRONTABDIR/uucp 44 45 # Newly installed systems have only comments in the /etc/uucp/Systems 46 # file. So if there is any content, then this is an upgrade with 47 # UUCP configured, and thus we don't want to clobber their crontab. 48 grep -v '^#' $BASEDIR/etc/uucp/Systems >/dev/null 2>&1 && exit 0 49 50 if [ \( $CRONRUNNING -eq 0 \) -a \( "$BASEDIR" = "/" \) ] 51 then 52 su uucp -c "crontab $CRONTABSRC" 53 else 54 if [ -d $CRONTABDIR ] 55 then 56 rm -f $CRONTABDEST 57 cp $CRONTABSRC $CRONTABDEST 58 chgrp sys $CRONTABDEST 59 chmod 400 $CRONTABDEST 60 fi 61 fi 62 63 exit 0 64