5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 1997 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
27 #ident "%Z%%M% %I% %E% SMI"
29 # This shell sends uucp status information to an administrator.
30 # It should be started by a line in /var/spool/cron/crontabs/uucp.
33 # 48 8,12,16 * * * /etc/uucp/uudemon.admin
36 # return a list of systems defined in /etc/uucp/Systems
38 if [ ! -f /etc
/uucp
/Systems
]; then
41 awk '$1 !~ /^#/ {print $1}' /etc
/uucp
/Systems
45 # return a list of systems defined in /etc/asppp.cf
47 if [ ! -f /etc
/asppp.cf
]; then
50 X
=`sed -e 's/#.*$//' /etc/asppp.cf`
54 if [ "$1" = "peer_system_name" ]; then
55 PPPSYSTEMS
="$PPPSYSTEMS $2"
65 # run through the systems list, deleting ppp systems
70 for j
in `getpppsystems`
72 if [ "$j" = "$i" ]; then
76 if [ $del -ne 1 ]; then
81 # if any names are in $outstr, assume uucp is configured
83 if [ -n "$outstr" ]; then
90 # Start of actual processing. For energystar compatibility,
91 # we attempt to do as little I/O as possible, so first check
92 # to see if uucp is configured before doing all this work.
103 LOGDIR
=/var
/uucp
/.Log
107 (uustat
-p; uustat
-q) > $TMP
110 (echo "Subject: uu-status"; echo; cat $TMP) |
mail $MAILTO
112 grep passwd
$ULOG/* > $TMP 2> /dev
/null
115 (echo "Subject: passwd check"; echo; cat $TMP) |
mail $MAILTO