Fix markup.
[netbsd-mini2440.git] / etc / monthly
blob24c5cb264b025e0fdec707afb5a13ec2c8e5406b
1 #!/bin/sh -
3 # $NetBSD: monthly,v 1.10 2004/04/09 17:35:21 kim Exp $
4 # from: @(#)monthly 8.1 (Berkeley) 6/9/93
7 export PATH=/bin:/usr/bin:/sbin:/usr/sbin
8 umask 077
10 if [ -s /etc/monthly.conf ]; then
11 . /etc/monthly.conf
14 host=`hostname`
15 date=`date`
16 rcvar_manpage='monthly.conf(5)'
18 echo "To: ${MAILTO:-root}"
19 echo "Subject: $host monthly output for $date"
20 echo ""
22 MONTHLYDIR=$(mktemp -d -t _monthly) || exit 1
24 trap "/bin/rm -rf $MONTHLYDIR ; exit 0" EXIT INT QUIT PIPE
26 if ! cd "$MONTHLYDIR"; then
27 echo "Can not cd to $MONTHLYDIR".
28 exit 1
31 TMP=monthly.$$
33 # echo ""
34 # echo "Doing login accounting:"
35 # ac -p | sort -nr +1
37 if [ -f /etc/monthly.local ]; then
38 . /etc/monthly.local > $TMP 2>&1
39 if [ -s $TMP ] ; then
40 printf "\nRunning /etc/monthly.local:\n"
41 cat $TMP
43 rm -f $TMP